File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ """
2+ Exemplo obtido na internet
3+ https://www.youtube.com/watch?v=vLuzO_vJrW4
4+ https://drive.google.com/file/d/1kFZamh1PqE2c6qmbjlA-HVlR-dtZjEDo/view
5+ acessado em 08/04/2020 as 11:05
6+ """
7+ from pyfirmata import Arduino , util
8+ import time
9+
10+ #void setup(){
11+ Uno = Arduino ('/dev/ttyACM0' )
12+ # Serial.begin(9600);
13+ print ('Olá Mundo!' ) # Serial.println("Olá Mundo!");
14+ #}
15+
16+
17+
18+ while True : # void loop(){
19+
20+ Uno .digital [13 ].write (1 ) # digitalWrite(13, HIGH);
21+ print ('LED ligado' ) # Serial.println("LED ligado");
22+ time .sleep (0.5 ) # delay(1000);
23+
24+ Uno .digital [13 ].write (0 ) # digitalWrite(13, LOW);
25+ print ('LED desligado' ) # Serial.println("LED desligado");
26+ time .sleep (1 ) # delay(1000);
27+
28+ #}
You can’t perform that action at this time.
0 commit comments