USB Serial interface between arduino to android and python
Device Support: Only tested on android 5, 6, 7 and 8.
*Note: No external power supply is needed for arduino. Phone will power the arduino via usb.Phone should have OTG support.*
HAQT app (link)
cd into the repo folder
python3 arduthon.py
To read serial data which is in bytes
byte[] response = new bytes[3];
port.read(response, READ_WAIT_MILLIS);
Windows:
library: pyserial
arduino = serial.Serial('COM4', 9600, timeout=0)
data = arduino.readline()
Ubuntu:
sudo apt-get install python-serial
Change this line to
arduino = serial.Serial('/dev/ttyACM0', 9600, timeout=0)