raspberry pi usb serial communication python

What you will learn here about raspberry pi usb serial communication

  • raspberry pi usb serial communication python

raspberry pi usb serial communication python

Please follow the following steps to know how to communicate or send data from ESP8266 or arduino to raspberry pi using USB serial communication
1)First please open your Arduino IDE
2)Now please upload the following code to to your ESP8266

void setup() 
{
Serial.begin(115200);
}
void loop()
{
delay(10000);
Serial.write(100);
Serial.write(-10);
Serial.write(-1);
}

Raspberry pi ESP8266 USB serial communication

3)Now please power your raspberry pi

4)Connect ESP8266 to the raspberry pi using USB which is shown below
Raspberry pi ESP8266 USB communication

5)Now please open the raspberry pi terminal and execute the following command to know the USB port

dmesg | tail

esp8266 raspberry serial communication

6)Now please download the following python code which will receive data serially from ESP8266 on the USB port number

USB serial communication python code (143 downloads)

7)Now please unzip downloaded code and open with python IDE in raspberry

8)Now please modify the serial port number in the code which we have found in step 5
raspberry pi usb serial communication python

9)Now please run the python script to receive data from ESP8266
raspberry pi usb serial communication

You may also like...

Leave a Reply