Hoping to get some advice. Here is what I would like to do:
I would like to be able to log blinks form my power meter (it blinks an LED 1000 imps/kWh) and provide access to the logged data using json (http). I'm hoping to visualize power consumption (in my house) on my iPhone
I have made a simple "eye" using a photoresistor and connected it to my "Arduino Uno" board. I am able to see an increase in the resistance when my power meter blinks. So far so good.
But now I'm a little lost.
- I'm looking at the "Arduino Ethernet w/o PoE module". Would I be able to use the SD slot on this board to log data and at the same time respond to requests (json)?
I found the following while reading about the "Arduino Ethernet w/o PoE module":
Note that because the W5100 and SD card share the SPI bus, only one can be active at a time. If you are using both peripherals in your program, this should be taken care of by the corresponding libraries.
I'm a c# developer so please excuse the flowing questions (I'm new to C):
2) How would i go about registering the blinks? Is there a better way than a simple "if(resistance > value)" in my main loop?
3) How would i go about logging data and at the same time be able to respond to requests and return JSON? (is there a way to do some sort of threading?)
Fingers crossed that someone can provide inspiration/answers