Serial port communication between Raspberry Pi 3 and Windows 10
Balram Chavan
Principal Software Engineer | Cloud Architect | Google Developer Expert Angular | Author | Trainer | Mentor
Recently, I had got an assignment to implement Serial Port communication between Raspberry Pi 3 and Windows 10.
Writing Python code to send data over serial port was easy but hurdle I faced was the communication setup between two devices. My client (Tom) is veteran in firmware programming and he explained me how setup should be done. So I followed his instructions and finally got it working. So I thought to share those steps with others as well.
I have RasPi 3 Model B with Raspbian Jessie and Lenovo laptop with Windows 10 OS.
For setup, I bought USB to Serial Port Adapter (2 pieces) and a Null Modem from Amazon.
Windows 10 Setup:
I have got installation CD from USB to Serial Adapter with drivers. After installation of drivers, I could see COM port is listed in Device Manager.
After that, I have downloaded and installed Putty.exe for serial port communication. In Putty, set connection to "Serial" and set speed (default 9600 is also fine).
Once setup is done, "Open" new session and there shall be empty console screen. So Putty is ready to receive data over serial port now.
Raspberry Pi 3 Setup:
You can write data over serial port with any standard method or you can download my Python script to send data over serial port from my GitHub repository.
Running python script shall pass data to Putty console as below.
After data is successfully sent from Raspi3, it will be written inside Putty session as below:
And that's how I got data sent over serial port between my RasPi 3 and Windows 10 using adapter and modem cables.
Steps by step instructions can be found in below video as well.
Enjoy!
software developer@ Qualminds Hyderabad
7 个月Hello balram I followed the way you did but data is sending and but it is not receiving on laptop
Certified Data Engineer | DevOps Engineer | Administrator | Python | SQL | Spark | Big Data | PowerShell | YAML | Terraform | Databricks | Unity Catalog| Azure | AWS | GCP | GitHub | GitHub Actions | ML & Data Science.
5 年Hi, Can share how to connect angular flask n mongodb
Manager Projects | RPA Technical Lead | RPA Solution Architect | .NET Technologies
6 年Excellent Balram!!!
Nice article