-
Notifications
You must be signed in to change notification settings - Fork 14
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
Circuit Playground Express - Unexpected Button B Behavior After External LED #13
Comments
hihi apologies i was prepping to reply to your email today :) |
Hi there! I've copied below and attached a .txt file with the log output from when I run this project: https://studio.code.org/projects/applab/91tPzAeXGuSthP8hNB1dmPznJOwfyTfU9LzhbWv2YXY. The text log includes the console.logs that are triggered in that project (when the board is connected, and when the "Up" and "Down" are detected in the project), so that we can see how it's interacting with the log. When testing this project, I clicked "Run", then clicked the B Button thrice, the touched the silver metal part of Button B with my fingertip, without pressing the button down. Please let me know if you need any more info or logs!
|
@ladyada is there any other information needed to help investigate this issue? We would love to provide an update to the teacher who originally reported this issue to us - is there any fix ETA we can share? |
hihi pardon the delay, was a little under the weather - i am investigating... firmata is very 'fun' to debug :D |
ok i have this set up now...i wanted to make sure i had plenty of time to understand whats up |
this is so weird @KylieModen can you reproduce this because i cant? |
@epeach Erin, can you try to repro again and provide the requested info above? |
thank you - sorry again for the delay! |
Hi there! I'm still able to reproduce this using the project code shown above. I've attached a zip of the CURRENT.UF2. Please let me know if there is more additional information needed. |
@epeach ok just to verify, can you try this? if you run that, does the right button work as you expect, with the led turning on when pressed and the correct console out |
does createLed(n) make a neopixel or is it a digital on/off? |
Hi there! I tested the code in the screenshot above and it works as expected. To the best of our knowledge, the unexpected behavior is limited to code that references LEDs external to the board. createLed(n) does not make a NeoPixel, just a digital on/off. We expect the LED object it creates to be able to handle the same commands that the LED on the board accepts (on, off, blink, toggle, and pulse). This is our documentation for the createLed() function: https://studio.code.org/docs/applab/createled/ |
ok i just tried this code
and it also seems to work, can you try it? its a little different |
When I use that code, it works as expected and I do not reproduce the original error. |
kk - does it stop working if you move the var myLed outside of boardConnected() or if you delete one or the other of the myLed function calls? |
I tried a variety of edits to see what would cause it to break. With the code listed above, moving the myLed outside of the boardConnected and deleting one of the myLed function calls, didn't seem to break the code. However, when I changed the pin number from 13 to either 2 or 0, I did reproduce the error. |
what pad are you expecting to be connected to 'pin 2'? |
Hi! I think that is the root of the issue. For 'Pin2', when using the Express Board, I would expect the 'A5' pad to be connected. In the Code.org code, we do some mapping to translate between the Classic and Express boards. I was playing around in our code and noticed that if I removed our pin mapping between the Classic and Express, and ran Would you recommend a specific protocol for managing the two sets of pin names between the Classic and Express? |
ok here's the variant mapping for the circuitplayground express the firmata code we wrote does some shim remapping so that the original code.org code pins get re-mapped to the new ones |
@epeach hihi checkin' in - were y'all able to try removing 'remapping' for D2 in codeorg? |
Hi there, a quick update that we plan to look at the remapping when Erin is back from vacation and has time to review, likely a few weeks. Appreciate your patience until we can take a look at that proposed solution. |
all good - enjoy the vaca!!! |
A quick update: So far, I have a repro and I'm basically at the same place that @epeach was last year: we have a small program that accepts presses of the left & right buttons, and also attempts to blink an external LED connected via alligator clips to GND & A5. We have some simple pin remappings in our code here. What I've observed is that bypassing those remappings fixes the problem in which the Right button events stop working. However, the remappings are required for the LED to turn on. Specifically, by the time we get to our fork of johnny-five's Any thoughts? We are happy to pair up in any form that would be helpful. |
Moving this from an email thread, as requested.
A few reports came in to Code.org about our AppLab and Circuit Playground integration. Users are seeing unexpected behavior with Button B on the Circuit Playground Express in our Maker App integration when running a project that connects to an external LED. I followed up and was able to confirm that this is limited to that button and is not reproducible on the Circuit Playground Classic.
Here is a project that can be used to reproduce the issue: https://studio.code.org/projects/applab/91tPzAeXGuSthP8hNB1dmPznJOwfyTfU9LzhbWv2YXY.
Gif show what happens when I run the program with the Circuit Playground Express connection. In the gif, after selecting "Run", the "Up" condition is triggered before I push a button. When I press the B Button, the "Down" condition is triggered, but the "Up" condition is not. When I press the button again, nothing happens. However, when I touch the silver metal part of Button B with my fingertip or conductive material without compressing the button, the "Down" and "Up" events are triggered, behaving similarly to a capacitive touch sensor.
Please let me know if I can provide any additional information.
cc: @KylieModen
The text was updated successfully, but these errors were encountered: