Better HN
topnewbestaskshowjobs
Log inSign up

tonyd256

53 karma · joined Oct 4, 2013 (13y ago) · 13 submissions

Submissions

1.

Using the Dropbox Objective-C API in Swift(robots.thoughtbot.com ↗)

5 points · by tonyd256 · 11y ago · discuss

2.

Parsing Embedded JSON and Arrays in Swift(robots.thoughtbot.com ↗)

5 points · by tonyd256 · 12y ago · discuss

3.

Real World JSON Parsing with Swift(robots.thoughtbot.com ↗)

9 points · by tonyd256 · 12y ago · discuss

comment 12y ago · link · parent

This is really great! Nice job!

comment 12y ago · link · parent

I considered this but we already have fancy light switches with motion detectors in our bathrooms and our company is strict about leaving the doors open when you leave so that hasn't been a problem. An added bonus of this is that if the last person is leaving and about to lock up they can see if a bathroom door is closed and check to make sure no one is still in there, where as the light could still be on.

comment 12y ago · link · parent

The ATMega328P is pretty low power. I could probably save a bit more with a smaller more targeted MCU, but I wanted this board to be as close to the Arduino Uno as possible. I'm not sure what you mean by a central server. It's possible to use an ATTiny series chip to sense the reed switches and transmit to the nRF24 board.

comment 12y ago · link · parent

Cool, there probably isn't a huge difference between idle and deep sleep modes so I'm sure it could still last a long time. In deep sleep you can still use the HIGH & LOW level interrupts but just not the CHANGE one.

comment 12y ago · link · parent

I totally agree. There are definitely some more things like this that I could have done to reduce power further and use normal external interrupts. I was going for more of a general purpose sensor board though and wanted to keep it minimal. I could also have used the HIGH and LOW level interrupts on those pins and just change which it triggers on every time it triggered. But I decided to go with the WDT.

comment 12y ago · link · parent

Great to see others are doing this too! I like your solution, very cool. I have some of those digispark boards but decided to go in a different direction making a standalone sensor board that transmits its sensor data to a hub for pushing to the cloud. There are tons of ways this could be done. The way I describe here worked best for us and achieved my goals for it.

comment 12y ago · link · parent

I used the WDT to make a platform for sensing any sensor in second intervals. Using the reed switches as external interrupts would have been specific to this application. Also, the ATMega328P doesn't allow you to set the interrupt to fire on CHANGE when using the lowest power mode.

For a door opening and closing a 1 second delay is fine. If it misses an event with that delay then it was probably a fluke. Think of it as a buffer to prevent false readings.

11.

Arduino Sensor Network – Bathroom occupancy detector(robots.thoughtbot.com ↗)

61 points · by tonyd256 · 12y ago · 37 comments

12.

Low Power Custom Arduino Sensor Board(robots.thoughtbot.com ↗)

3 points · by tonyd256 · 12y ago · discuss

13.

Arduino-Based Bathroom Occupancy Detector(robots.thoughtbot.com ↗)

8 points · by tonyd256 · 12y ago · discuss