PWM and Analog Read Support
Options
Duncan Iglesias
New Member Posts: 15 ✭
Hello,
I am developing a robot application on the Up Board and am wondering if there are any existing CPP/Python libraries for PWM read/write for this board that are comparable to the RPi.GPIO library available for the Raspberry Pi boards. No point reinventing the wheel right?
From my experience using the /sys/class/pwm/pwmchip# can only write PWM however not read one in return. So my approach would be to use an interrupt based method to measure the duration of the pulse high through the /sys/class/gpio interface.
Thanks,
DJI
I am developing a robot application on the Up Board and am wondering if there are any existing CPP/Python libraries for PWM read/write for this board that are comparable to the RPi.GPIO library available for the Raspberry Pi boards. No point reinventing the wheel right?
From my experience using the /sys/class/pwm/pwmchip# can only write PWM however not read one in return. So my approach would be to use an interrupt based method to measure the duration of the pulse high through the /sys/class/gpio interface.
Thanks,
DJI
Comments
-
-
To answer my own question on this matter. The Up Board can only generate up to two PWM pins and would require a custom script to read in PWM signals which would be a time hog. Instead, you can just use a hat from this list of compatible hats.
https://up-community.org/wiki/Verified_HATs
Alternatively, you can program a slave Arduino to handle all data acquisition and communication via serial, I2C, or rosserial.
Good luck on your projects!
Duncan
Categories
- All Categories
- 63 Announcements & News
- 139 Product News - New Product/Product Change Notice/ End-of-life
- 112 Welcome Developers!
- 60 Unboxing & Project Sharing
- 114 Tech Updates
- 3.6K UP Products
- 119 UP 7000
- 25 UP Squared i12
- 24 UP Xtreme i12
- 14 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 24 UP Squared V2
- 65 UP 4000
- 23 UP Xtreme i11
- 34 UP Squared 6000
- 59 UP Squared Pro
- 135 UP Xtreme
- 820 UP Squared
- 1.4K UP Board
- 74 UP Core Plus
- 217 UP Core
- 3 UP Xtreme Lite
- 40 UP AI Edge
- 265 Starter Kits & Peripheral