Closed nekuneko closed 4 years ago
hi interesting idea - however the bootloader could also do this - we do that on our boards.
Yes, I know it, I forget to mention I made a custom bootloader for my board following uf2-samdx1 specification and I didn't have any problem turning the builtin neopixel into green color in bootloader mode. In bootloader mode this neopixel nano led works properly but when I upload a new code to the board from Arduino IDE is when this issue happens, and just only with the Neopixel Nano, not the Neopixel Mini nor the DotStar.
I will keep investigating the problem. I will try to substitute a Neopixel Mini for a Neopixel Nano on an Adafruit Feather M0 Express board and see what happens. I understand that right now this code is not usefull for your boards because you employ the Neopixel Mini on them or the DotStar not the Neopixel Nano.
Thank you very much anyway. :)
Ok, finally I didn't replace the Neopixel Mini, I have tested the following steps:
make BOARD=feather_m0_express
bootloader-feather_m0_express-v3.9.0-dirty.elf
).I obtained the same error-prone behaviour, with the Neopixel Mini high illuminated in yellow after upload a Blink. If I reset or power-off/on the board, the Neopixel still brights high in yellow.
Nevertheless, if I upload the firmware pre-compiled, located in ArduinoCore-samd/.../1.5.11\bootloaders\featherM0\bootloader-feather_m0-v2.0.0-adafruit.5.elf
, then doesn't happen the error and the Neopixel remains off when upload a new code. If I put the board in bootloader mode, and reset by pressing the button, Neopixel stills bright low in green, but by power off-on the board the Neopixel remains off.
So it looks like the issue is related to the bootloader. Hmmmm....
the metro m0 in particular has a shared neopixel line so it specifically has a #ifdef to manage it - check the uf2 src (it isnt very complex :)
Do you mean this line located in uf2-sdamx1/inc/neopixel.h
file?
I didn't touch it at all. Is any change needed to perform on default uf2-sdamx1/inc/uf2.h
file?
Thank you for your support and for answer so quick. :)
Hello @ladyada and Adafruit Team, I was recently developing a new custom board in which I'm using an Adafruit Neopixel Nano 2427 RGB LED as neopixel builtin led. Every time I uploaded a new sketch this led keeped on in white color at full luminosity, that was too annoying. I think meanwhile a new Arduino code is uploading to the board, the neopixel led goes crazy performing some kind of pulse secuences which provoke to the neopixel to end in that high luminosity state. Maybe this pin keeps in HIGH state and send a '1' sequence.
In order to solution this behaviour I studied the uf2-samdx1 and ArduinoCore-samd code, and I didn't found any code in this last one repository which mention neopixel. I have included & adapted the basic uf2-samdx1 neopixel code to the ArduinoCore-samd code in order to keep the neopixel and dotstar leds off at startup of every arduino sketch.
I find out that in some new boards variants files you have added the constats
NEOPIXEL_BUILTIN
andPIN_NEOPIXEL
. I have also added another one,NEOPIXEL_COUNT
in oder to know the amount of neopixel and properly power off all them all. For this reason I have updated some of your variant.h files.I have tested this changes on my Adafruit Feather M0, Feather M4, Metro M4 and Pygamer boards and I didn't get any compilation issue, even by using Adafruit Neopixel Library.
I didn't notice this issue with Neopixel Mini 3535 RGB LEDs, hope this code update could be useful in a future board.
Best regards, NeKuNeKo Σ:3