User avatar
Posts: 34
Joined: Sun May 31, 2015 4:01 pm
Location: Balıkesir, Turkey

Read Serial Monitor and Assign Values

Sat Apr 29, 2017 5:07 pm


I was following this example here: ... unication/

Everything is ok with this example.

BTW I am also using Python.

What I want? I want to send two different int variable from Arduino. Then I want to assign them to different variables on RPi. Like example below;

I want to send x and y values to serialMonitor.
x = 10;
y = 20;

I want to assign this values to a and b on RPi
Raspberry Pi:
a = x
b = y
print("a = %d".a)
print("b = %d".b)

(my code is just an example.)

Return to “Beginners”