Python interface for the Firmata (http://firmata.org/) protocol. It is compliant with Firmata 2.1. Any help with updating to 2.2 is welcome. The Capability Query is implemented, but the Pin State Query feature not yet.
MIT License
575
stars
193
forks
source link
ImportError: cannot import name 'Arduino' from 'pyfirmata' #105
from pyfirmata import Arduino, util
import time
board = Arduino('COM7')
iterator = util.Iterator(board)
iterator.start()
button = board.get_pin('d:2:i')
while True:
print(button.read())
time.sleep(1)
And this is the output :
File "c:/Users/ASUS/Documents/Arduino/IOT/praktikum7/pyfirmata.py", line 1, in <module>
from pyfirmata import Arduino, util
File "c:\Users\ASUS\Documents\Arduino\IOT\praktikum7\pyfirmata.py", line 1, in <module>
from pyfirmata import Arduino, util
ImportError: cannot import name 'Arduino' from 'pyfirmata' (c:\Users\ASUS\Documents\Arduino\IOT\praktikum7\pyfirmata.py)
this is the source code :
And this is the output :