In this step, I'll send data from Arduino to Raspberry PI.
When the user activates the emergency function, a signal will be sent to the RPI that will take a photo and publish on a web server. You can find more information about the traffic lights project here.
Step 1: Connecting Arduino to Raspberry PI
The RPI is connected to a camera module. A USB cable connects power and serial from the RPI to the Arduino. |
The first step is to find the serial port. For the RPI, I've compared the tty ports without and with the Arduino.
The interface /dev/ttyACM0 shows up when I connect the Arduino over USB. |
I uploaded a small python script with code that I found on DiyIOt from my Windows computer to my Raspberry PI.
I added a couple of lines to take a photo on the webcam |
When the RPI detects "Switch to Emergency", it captures a JPEG image. |