Monitoring TCP traffic on a Ubuntu box
nc -l -p 888
- -l = Listen
- -p = Port
ESP8266 as the main controller
LM393 light sensor such as this one:
Desolder the sensor and remote mount it. It's just a cheap LDR. Plan is to stick it onto the LED on the meter.
Powersupply - Breadboard 3.3v 5v supply
Pulse Detect line to ESP8266 - I'm using GPIO in my sample circuit - but have to switch to GPIO 2 as it makes reprogramming tricky.
ESP8266 Interrrupt to pick up changes in light levels. Due to noise - need to decouple the ISR. So plan is to use a software debounce approach. A standard ISR will count the pulses - which might be several thousand per pulse. A second timer will operate every 10msec, and if the count of ISR pulses is > 1 then increment a second counter by 1. This will ensure that the circuit does not pick up noise.
The software will record pulses per minute. A minute timer will kick off and reset the pulse count. It will then open a TCPIP connection to
- The owl - report the pulse count for the last minute
The data will be written to a ESP File and stored for later retrieval as required.