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

analogWrite to pads doesnt work? #604

Closed
ladyada opened this issue Jan 24, 2018 · 13 comments
Closed

analogWrite to pads doesnt work? #604

ladyada opened this issue Jan 24, 2018 · 13 comments
Assignees
Labels

Comments

@ladyada
Copy link

ladyada commented Jan 24, 2018

hiya trying to generate a PWM signal on the pads does not seem to do anything?

image

also, relatedly, A8, A9 and A10 should not appear here as they are internal sensors and its weird to have them be outputs! :)

image

@pelikhan
Copy link
Member

The pin map is defined here: https://github.com/Microsoft/pxt-adafruit/blob/master/libs/circuit-playground/device.d.ts#L34 . Any other we should remove?

@ladyada
Copy link
Author

ladyada commented Jan 24, 2018

just A8, A9, and A10 should be removed from that list
A0 doesnt have a timer so PWM is hard to do but you can do true analog writes

@jedgarpark
Copy link

jedgarpark commented Feb 11, 2018

I'm trying to do analogWrite to A0, but this seems like it currently doesn't output any voltage when you send 1023 or any other values. I should add, I'm trying to get true analog voltage using the DAC, not PWM.

@pelikhan
Copy link
Member

pelikhan commented Feb 11, 2018 via email

@jedgarpark
Copy link

jedgarpark commented Feb 11, 2018

that's the only one I'm trying because i want a real analog signal, not PWM like the other pins. (This is the only one connected to a DAC.)

@pelikhan
Copy link
Member

Looking into this.

@pelikhan
Copy link
Member

pelikhan commented Feb 13, 2018

And the results are in:

  • A0: lock
  • A1: ok
  • A2: ok
  • A3: ok
  • A4: lock
  • A5: lock
  • A6: lock
  • A7: lock

@pelikhan
Copy link
Member

pelikhan commented Apr 3, 2018

A fix is in beta. @ladyada We ended up restricting PWM out to A1 and A2. Use 3 PWM pins would lock the device and pins A4, A5, A6, A7 lock the device as well because of an mbed issue (see lancaster-university/codal-circuit-playground#5). Maybe we can get some cycles from your engineers to help fix this issue.

@ladyada
Copy link
Author

ladyada commented Apr 3, 2018

ok according to my docs, only A1, A2 A3 and A6 have PWM out, so A1 and A2 are good!

@ladyada
Copy link
Author

ladyada commented Apr 13, 2018

@pelikhan heya related Q, i want to try this and also test out a customer issue https://forums.adafruit.com/viewtopic.php?f=58&t=133680 but i can only update to 1.0.28 adafruit CPX release which is from ~2 weeks ago and it looks like some stuff was released since. is there a way to 'force' makecode to upgrade to the latest?

image

@pelikhan
Copy link
Member

pelikhan commented Apr 13, 2018 via email

@abchatra
Copy link
Contributor

abchatra commented Jun 7, 2018

This bug seems to be fixed.

@lock
Copy link

lock bot commented Sep 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants