I'am working on a project where i'am to recieve data from a arduino mega to my raspberry pi 3 using Uart.
I have established a working link between the two devices. However, the data received from the arduino is just garbage, when i'am printing the data on my terminal it just gives me all sort of wierd signs.
The TTL levels for both devices should be right.
The code i'am using to receive the data is very simple.
Code: Select all
import time
import serial
ser=serial.Serial(
port='//dev/ttyAMA0',
baudrate=9600,
timeout=1
)
while 1:
if ser.in_waiting>0:
x=ser.readline()
print x
On the arduino side i'am using Serial.print('....')
I should add that i'am a beginner, if that wasn't obvious. So everything you got might help.