
On your Raspberry Pi, the Arduino board
should now appear as /dev/ttyACM0 or /dev/
ttyUSB0. You can verify this by typing ls /dev/
tty* into the Pi terminal.
Now run the Pi Smart Cam code, arduino_
comms.py. This Python application receives data
via serial comms from the Arduino (Figure
J
).
The output seen in the terminal prints the value
1, representing the PIR sensor state being HIGH,
meaning motion is detected!
Note that the baud rate is set to 9600 (Figure
K
).
6. 3D PRINT THE CAMERA HOUSING
If you have access to a 3D printer, you can
optionally build your own camera chassis (Figures
L
,
M
, and
N
) to house the camera, PIR sensor,
Arduino, and ...