We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to get the values from analog 0.
This works:
#-------------------------------------------------- from pyfirmata import Arduino, util import pyfirmata board = Arduino("COM7") it = util.Iterator(board) it.start() board.analog[0].enable_reporting() while True: print board.analog[0].read() #--------------------------------------------------
But why doesn't this work?
#-------------------------------------------------- from pyfirmata import Arduino, util import pyfirmata board = Arduino("COM7") it = util.Iterator(board) it.start() def _analogHandler(*args): print board.analog[0].read() board.analog[0].enable_reporting() board.add_cmd_handler(pyfirmata.pyfirmata.ANALOG_MESSAGE, _analogHandler) #--------------------------------------------------
Even though the tests.py passes the analog tests, it doesn't seem like you can receive messages when relying on the handler.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to get the values from analog 0.
This works:
But why doesn't this work?
Even though the tests.py passes the analog tests, it doesn't seem like you can receive messages when relying on the handler.
The text was updated successfully, but these errors were encountered: