Today we came to school with the following tasks:
- Establish serial communication with RPi and Arduino
- Use 2 ultrasonic sensors
- Test conductive paint
I came to school and started up my Raspberry Pi, which I setup over the weekend, and started browsing for examples online.
This was the simplest and cleanest example I found. I reused the arduino ping sensor code and rewrote the python code to the following:
import serial
ser = serial.Serial ('/dev/ttyACM0', 9600)
while 1:
if(ser.in_waiting >0):
line = ser.readline()
print(line)
Result:

Next I decided to research the conductive paint a bit more:….
Leave a comment