Comments (1)
I use PWM.Servo, as in:
Set the servo period to one million uSec (1S), increments of 5us
(necessary for 25us pulse width)
s=RPIO.PWM.Servo(subcycle_time_us=1000000, pulse_incr_us=5)
Set pulse width to 25us
s.set_servo(18, 25)
This is for a 25us pulse once per second.
On Wed, May 6, 2015 at 4:59 AM, withr [email protected] wrote:
In the example of "example4_pwm_lowlevel.py", it said we can add a new
pulse to a subcycle. E.g.:import RPIO.PWM as PWM
GPIO = 17
CHANNEL = 0PWM.set_loglevel(PWM.LOG_LEVEL_DEBUG)
PWM.setup()
PWM.init_channel(CHANNEL)
PWM.print_channel(CHANNEL)PWM.add_channel_pulse(CHANNEL, GPIO, 0, 50)
PWM.add_channel_pulse(CHANNEL, GPIO, 100, 50)The above code will generate a pulse with two high levels, for each level,
the width is 50*10us, the subcycle should looks like:
--------__,what if I want change the pulse to --? I don't think we can
use PWM.add_channel_pulse(CHANNEL, GPIO, 50, 50), because I feel that will
create: ------_, Am I right? how to change the pulse width
smoothly?—
Reply to this email directly or view it on GitHub
#60.
from rpio.
Related Issues (20)
- RPIO ver.2 HOT 1
- Input function doen't work
- System hangs during reboot with RPIO python script running in docker HOT 1
- SystemError: This module can only be run on a Raspberry Pi! HOT 4
- Raspberry CM3 module unsupported. HOT 1
- Debian buster need #include <sys/sysmacros.h> inside pwm.c
- After upgrading to buster branch v2 stops working HOT 1
- Uncaught Error: Cannot find 'rpio'
- RPI 4 Model HOT 1
- RuntimeError: This module can only be run on a Raspberry Pi! HOT 2
- SystemError: This module can only be run on a Raspberry Pi!
- _PWM.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: makedev HOT 4
- how disable debbug ?
- RPIO-0.10.0-py3.5-linux-armv7l.egg SystemError: This module can only be run on a Raspberry Pi! HOT 1
- Interrupted by signal 11: SIGSEGV
- mmap check
- System error
- Problem running RPIO on Raspberry Pi 4 HOT 2
- RPIO won't run on my Raspberry Pi 4, how to remove? HOT 1
- https://pythonhosted.org/RPIO/#installation seems outdated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpio.