-
Notifications
You must be signed in to change notification settings - Fork 20
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
Need workaround for tessel.port['GPIO'].pwm[0]
for TM02
#77
Comments
Looks like the variant table for V2 (and V1) does not have the proper flag for PWM: https://github.com/tessel/firmware/blob/e4ddfe70baa22f3cbdb8a9e9ca59e30891c29863/src/variants/lpc18xx/variant.c#L200 Is that an oversight, or does the hardware really not support it? |
Only pin G3 supports PWM on those hardware versions. (which is not one of the PWM pins on 03/04 hardware). |
Can the JS side be updated so that the correct pin is in the pwm array then? Right now this code doesn't work either: var tessel = require('tessel'),
port = tessel.port.GPIO,
pin = port.digital[2];
port.pwmFrequency(50);
pin.pwmDutyCycle(0.6); Outputs:
|
workaround: var tessel = require('tessel'),
port = tessel.port.GPIO,
pin = port.pin['G3'];
pin.__proto__ = port.pwm[0].__proto__;
port.pwmFrequency(50);
pin.pwmDutyCycle(0.6); |
Are you on a Tessel V2 or a V4? |
derp, nevermind read your opening post |
tessel.port['GPIO'].pwm[0]
?tessel.port['GPIO'].pwm[0]
for TM02
I'm having trouble outputting PWM on my TM-00-002 board:
Outputs:
The text was updated successfully, but these errors were encountered: