It’s been a very productive day so far. I’ve managed to get two separate Arduinos to communicate via a transmitter and a receiver! Add in the code from yesterday’s pressure sensor and I can now use the pressure sensor as a command to send a message to the receiver, with no communication when the sensor is idle.
Here’s a couple of diagrams I sketched of the circuits:
And here’s the code:
Here’s a video of it working. Notice the serial monitor on my laptop screen: the transmitter is coded to send the message “It works” which the receiver is picking up and printing on the screen. Both circuits also flash an LED to represent a message being sent/received:
Finally, here I am putting it into context – think of it as an experience prototype. If I put the pressure sensor under a cushion on a chair I can detect someone sitting on it which is indicated by the LED lighting up. Hopefully later developments will do something a bit more exciting.