Devices & Components
Arduino Uno Rev3
Breadboard (generic)
Rotary potentiometer (generic)
Jumper wires (generic)
Software & Tools
Python 3
Arduino IDE
Project description
Code
Python_serial_project.ino
c_cpp
1/* 2by polyhedra64 3*/ 4 5void setup() { 6 // put your setup code here, to run once: 7 Serial.begin(9600); 8} 9 10void loop() { 11 // put your main code here, to run repeatedly: 12 Serial.println(analogRead(A0)); 13 delay(100); 14}
Serial arduino project.py
python
This is the python
1#/////////////////// 2#/ By polyhedra64 / 3#/////////////////// 4 5import serial 6import time 7 8Arduino =serial.Serial('com3',9600) 9 10while 1: 11 data = str(Arduino.readline().decode('ascii')) #read the data 12 print(data) 13 time.sleep(0.1) 14 15 16
Downloadable files
Wiring connectinons
Just read it
Wiring connectinons
Comments
Only logged in users can leave comments