Skip to content
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

Minnow Max unwanted behavior for pulsewidth_ms() #284

Open
cosscat opened this issue Sep 17, 2015 · 6 comments
Open

Minnow Max unwanted behavior for pulsewidth_ms() #284

cosscat opened this issue Sep 17, 2015 · 6 comments

Comments

@cosscat
Copy link

cosscat commented Sep 17, 2015

Hello,

Tested on: 'v0.7.5-55-g5c7bab1'
The behavior of pulsewidth_ms() chaotic. An LED used for it on pin 22 would not follow the duty cycle settings:

>>> p = m.Pwm(22)
>>> p.period(0.1) # this is 100ms
0
>>> p.pulsewidth_ms(90) # LED not lighting
0
>>> p.pulsewidth_ms(90) # LED lights
0
>>> p.pulsewidth_ms(80) # LED is not lighting
0
>>> p.pulsewidth_ms(70) # LED lights
0
>>> p.pulsewidth_ms(60)
0
>>> p.pulsewidth_ms(50)
0
>>> p.pulsewidth_ms(90)

@cosscat
Copy link
Author

cosscat commented Sep 17, 2015

happens for p.write(percentage value) too:
eg. p.write(0.2)
and for setting the pulsewidth in us:
eg.

p.pulsewidth_us(90000)
0

@cosscat
Copy link
Author

cosscat commented Sep 17, 2015

the percentage is set correctly:

p.write(0.9)
0
p.read()
0.89999997615814209

@alext-mkrs
Copy link
Contributor

Same as with #283, if you could reproduce this on Galileo or Edison I'd be glad to look into this, otherwise we'd need to wait until @arfoll has time to check it out. Though I'm not sure if you have a MinnowBoard either, Brendan?

@cosscat
Copy link
Author

cosscat commented Dec 2, 2015

Works fine for Galileo, will check for Edison shortly

@cosscat
Copy link
Author

cosscat commented Dec 3, 2015

Edison is fine too

@alext-mkrs
Copy link
Contributor

Got it, thanks @cosscat. Then unfortunately we'll need to wait for someone with Minnowboard to try this out as I don't have one as I mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants