(sorry JC, I seem to have some sort of “destructive” way of using your creations
The way I’m going to use this Utility Plug is not standard; the only reason I want to use this Utility Plug is to have a good-fitting RJ12 plug sticking out of the enclosure in a way that it keeps the whole construction as strong as possible. I could just as easily have glued a RJ12 Plug into the enclosure, but with the headers plugged into the carrier board I think I have a stronger construction than without the use of this Plug.
Since I will need to use more than 1 JeeNode Port (a button and 2 LEDs), I made sure that the Utility Plug headers were isolated from the Plug but were still usable construction-wise, so I cut all connections between the headers and the PCB, as can be seen in the picture above. Instead of using the headers, I soldered an Extension cable to the Utility Plug; this way I can do whatever I want with those 6 wires! After checking the header isolation with a multimeter and connecting the Extension cable wires to the JeeNode ports, I was ready to start writing some code. But first, let’s specify how this Ethernet enabled doorbell should behave. It should:
- Periodically query my system and ask whether it’s dark outside or not and turn on the “night LED” inside the doorbell based on that. If the query fails, it should always turn on the night LED;
- Switch on the blue “signalling LED” when the button is pressed; if the white night LED is on at that moment, it should switch that one off;
- Switch off the blue “signalling LED” when the button is released; if it’s dark outside, it should switch the white night LED on;
- Periodically send a heartbeat to my system;
- Only send a “Doorbell pressed” message to my system once in a specific time-frame (1 second or so, to eliminate jitter).
I’m almost there! Most of these items are already working, but there are still some small issues to be resolved. As always, the details take most of the time..