vascop / python-arduino-proto-api-v2 Goto Github PK
View Code? Open in Web Editor NEWA Python-Arduino-Prototyping-API fork gone wild
License: MIT License
A Python-Arduino-Prototyping-API fork gone wild
License: MIT License
b.output([3])
will set 3 as an output pin. I would like to know how do one assigns a pin as input pin and read the digital value from it?
I am trying to read value from Ultrasonic Sensor which is connected to pin 4 and 5 respectively.
4 is the output pin and 5 is the input pin.
b.output([4])
will now be the output pin, I can use b.setHigh(4)
and b.setLow(4)
to turn it on and off, but how do I set 5 as input pin and read the values?
and how would one get the values from pulseIn()
method?
b = Arduino('/dev/tty.usbmodem1421')
pin = 9
b.output([pin]) // hangs on this line
anything i'm doing wrong?
from arduino import Arduino
import time
my_board = Arduino('COM5')
print my_board
my_board.output([9,10,11])
i=0
while(i<10):
print 'Writing Value'
val = my_board.analogWrite(11,255)
time.sleep(10)
i+=1
my_board.close()
This code hangs after 'Writing Value'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.