tino / pyFirmata

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

read an analog value from a pwm port (arduino) with pyfirmata2 on Python #99

Open houdini52 opened 3 years ago

houdini52 commented 3 years ago

How to do that ? I didn't see any instructions on the web how I can do that. I'm trying to read the value of the distance sensor (Ultrasonic) from the echo_pin(PWM) I tried many many things but not success. He re in my code I was expecting to read it from the analog port 0 but I have many values that doesn't help me. A help would be greatly appreciated. Thanks in advance. hcsr04_simpletest21.py.txt