8000 duty_cycle miscalc/overflow · Issue #151 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content
8000

duty_cycle miscalc/overflow #151

New issue

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

Closed
ladyada opened this issue Jun 9, 2017 · 0 comments
Closed

duty_cycle miscalc/overflow #151

ladyada opened this issue Jun 9, 2017 · 0 comments

Comments

@ladyada
Copy link
Member
ladyada commented Jun 9, 2017
# ardx demo #7-2
from digitalio import *
from board import *
from pulseio import *
import time

Direction = DigitalInOut.Direction 
led = PWMOut(D9)

brightness = 44800
brightness = max(0, brightness)
brightness = min(65000, brightness)
led.duty_cycle = brightness
print(brightness)
print(led.duty_cycle)

duty_cycle overflows :) should allow up to 65535

@tannewt tannewt closed this as completed in a884acc Jun 9, 2017
dhalbert pushed a commit to dhalbert/circuitpython that referenced this issue Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0