You have chosen to sponsor your bid up to a maximum amount of .
This is a simple project. I need an arduino to monitor 2 light towers.
I have already set up an arduino Due connected to the signal tower as shown in the attached image.
Here is a summary of how it works in case the picture isnt clear.
Each light tower has 3 24v lamps.
These lamps are turned on and off externally.
I have tapped into each lamp's power, and each wire runs to a 24v reed relay.
Each relay pulls down a pin on the arduino.
I have also attached an ethernet module as shown here:
A lamp can be in one of 3 states: on, off, or flashing.
Each time the state of any single lamp changes, the tower's states needs to be sent to the server.
(ex. http://server01/signaltower.php?towerid=01&red=0&yellow=2&green=1.... 0 is off, 2 is flashing, 1 is on)
This should happen as the unit turns on as well.
If flashing, it would be at a rate of two flashes per second (at 500ms intervals).
I had tried to write the code myself using interrupts to monitor these pins but I keep getting strange results as soon as I wanted to monitor more than one pin.
My interrupt routine would check if the last flash was between 400ms and 600ms ago. If it was, it would set the state to 2 (flashing) and a flag so the loop will post to the server.
I also set a flag so that the loop will check back in 600ms. If (now - lastcheck) > 600. we would catch a 'solid on' or 'solid off' state. This wouldn't trigger if it was flashing, because every ~500ms 'lastcheck' would be reset.
I have attached my sketch (very inefficiently written) for reference.
For testing, just set up another arduino as a test flasher or get a flashing relay.
Anyway, this is very basic and should be easy for someone who has done this before.
The only deliverable here is a sketch/libraries etc. I already have the boards hooked up.
Thanks! I need this urgently so please only quote if you have time this week or early next week.
Additional Project Description:
10/09/2013 at 1:42 PHT
I don't need any assistance with server code. I just need you to make the request and the server can return anything you want (for confirmation).