Much has been written regarding the Raspberry PI to Arduino Serial Port com's, so i thought I would add my own helpful basic info. I will over time improve the data, but for now, view the below info windows:-
Refer to the website for the "unicode" decoding and encoding.
URL unicode character set
https://pypi.org/project/Unidecode/
Programming Raspberry PI with Unicode character decoding
See PEP 261 for details regarding support for “wide” Unicode characters in Python.
To install the latest version of Unidecode from the Python package index, use these commands:
$ pip install unidecode
Arduino sending
void setup()
{
// initialize serial:
Serial.begin(57600);
}
void loop()
{
Serial.println("gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ ");
delay(500);
}
The Raspberry PI code is:-
Raspberry PI Rx code
import unicodedata
import serial
ser = serial.Serial('/dev/ttyUSB0', 57600)
while 1:
if(ser.in_waiting >0):
line = str(ser.readline().decode("utf-8").strip())
print(line)
Results are :-
Results :-
>>> %Run 'serial port using unicode.py'
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
gw0aju : --> 'gw4rva, g4wrd, gw0hyl' hi chaps, how are things k Σ
========================= RESTART =========================
For now folks that's it.
Cheers
Alastair GW0AJU