Can someone please show me a full python sample code that uses pyserial, i have the package and am wondering how to send the AT commands and read them back!
Robust Arduino Serial is a simple and robust serial communication protocol. It was designed to make two arduinos communicate, but can also be useful when you want a computer (e.g. a Raspberry Pi) to communicate with an Arduino.
It supports both Python 2 and 3.
This repository is part of the Robust Arduino Serial project, main repository: https://github.com/araffin/arduino-robust-serial
Please read the Medium Article to have an overview of this protocol.
Documentation: https://python-arduino-serial.readthedocs.io
Implementations are available in various programming languages:
Installation
Using pip:
From Source:
Tests
Run the tests (require pytest):
Examples
Read write in a file (WARNING: the file will be deleted when the script exits)
Serial communication with an Arduino: Arduino Source Code
Example: Communication with Sockets
It can be useful when you want two programs to communicate over a network (e.g. using wifi) or even locally on the same computer (e.g. when you want a python2 script that communicates with a python3 script).
- Start the server:
- Run the client:
Bluetooth Example with Two Computers
Dependencies:
You need to change the server mac address
SERVER_ADDR
, you can use hciconfig
to know the mac address of your computer.Server:
Client:
Robust Arduino Serial is a simple and robust serial communication protocol. It was designed to make two arduinos communicate, but can also be useful when you want a computer (e.g. a Raspberry Pi) to communicate with an Arduino.
It supports both Python 2 and 3.
This repository is part of the Robust Arduino Serial project, main repository: https://github.com/araffin/arduino-robust-serial
Please read the Medium Article to have an overview of this protocol.
Documentation: https://python-arduino-serial.readthedocs.io
Implementations are available in various programming languages:
Installation
Using pip:
From Source:
Tests
Run the tests (require pytest):
Examples
Read write in a file (WARNING: the file will be deleted when the script exits)
Serial communication with an Arduino: Arduino Source Code
Example: Communication with Sockets
It can be useful when you want two programs to communicate over a network (e.g. using wifi) or even locally on the same computer (e.g. when you want a python2 script that communicates with a python3 script).
- Start the server:
- Run the client:
Bluetooth Example with Two Computers
Dependencies:
You need to change the server mac address
SERVER_ADDR
, you can use hciconfig
to know the mac address of your computer.Server:
Client: