mirror of
https://github.com/brmlab/edubrm.git
synced 2025-08-03 07:13:37 +02:00
add pwm1 (not working)
This commit is contained in:
parent
e9713ca9b7
commit
888b659330
4 changed files with 44 additions and 43 deletions
|
@ -25,6 +25,7 @@ class Device:
|
|||
|
||||
# sets pwm (which=1,2), (duty=16bit)
|
||||
def pwm(self, which, duty):
|
||||
duty = 65535 - duty
|
||||
self.epo.write('p' + chr(which) + chr(duty & 0xff) + chr(duty >> 8))
|
||||
|
||||
# sets ddswave (wave=square,sine,saw1,saw2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue