0

Gemma M0 Test Code for Neopixels
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Mon Aug 05, 2019 1:09 pm

Hmmm. Odd. Let's back up a little and check your setup and make sure we can get the basic programming flow working.

Can you start by posting a screen shot of the contents of your CIRCUITPY folder.

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Mon Aug 05, 2019 7:18 pm

Folder contents.
Attachments
Screen Shot 2019-08-01 at 1.07.23 PM.png
Screen Shot 2019-08-01 at 1.07.23 PM.png (54.3 KiB) Viewed 180 times

jeremyzschau
 
Posts: 128
Joined: Fri Feb 27, 2015 11:00 pm

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Mon Aug 05, 2019 7:29 pm

OK. Next, rename code.py to backup_code.py. Then relaunch the mu editor with the board connected as you've done before. Press the Serial button at the top to open the REPL window, which should show up at the bottom of the editor. If you don't see anything in this window, click on it and press enter a few times. See if you can get to the point where you see the >>> prompt as shown below.

mu_serial.jpg
mu_serial.jpg (65.02 KiB) Viewed 179 times

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Mon Aug 05, 2019 8:12 pm

OK. Here are two screenshots from your instructions.
Attachments
Screen Shot 2019-08-06 at 9.06.16 AM.png
Screen Shot 2019-08-06 at 9.06.16 AM.png (28.32 KiB) Viewed 169 times
Screen Shot 2019-08-06 at 9.05.55 AM.png
Screen Shot 2019-08-06 at 9.05.55 AM.png (158.08 KiB) Viewed 169 times

jeremyzschau
 
Posts: 128
Joined: Fri Feb 27, 2015 11:00 pm

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Mon Aug 05, 2019 8:17 pm

Excellent. What color is the RGB LED on the Gemma M0 when everything is as shown above?

This LED:
gemma_led.jpg
gemma_led.jpg (31.21 KiB) Viewed 167 times

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Mon Aug 05, 2019 11:09 pm

Purple.

jeremyzschau
 
Posts: 128
Joined: Fri Feb 27, 2015 11:00 pm

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Tue Aug 06, 2019 10:33 am

Hmmm. It should be white. But the DotStar doesn't do a good job of mixing the RGB LEDs and "white" does look a bit purple-ish.

Try controlling the DotStar manually via the REPL. Type in these commands at the >>> prompt.
Code: Select all | TOGGLE FULL SIZE
import board
import adafruit_dotstar
led = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
led.fill(0x0000ff)

like this:
Screenshot from 2019-08-06 07-25-17.png
Screenshot from 2019-08-06 07-25-17.png (84.84 KiB) Viewed 147 times


Hopefully you get a blue DotStar. Then, also try this:
Code: Select all | TOGGLE FULL SIZE
led.fill(0xffffff)

which should be white. But does it look like the same purple you got above?

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Tue Aug 06, 2019 11:54 pm

There is an error.
Attachments
Screen Shot 2019-08-07 at 12.47.34 PM.png
Screen Shot 2019-08-07 at 12.47.34 PM.png (355.69 KiB) Viewed 140 times
Screen Shot 2019-08-07 at 12.47.54 PM.png
Screen Shot 2019-08-07 at 12.47.54 PM.png (340.91 KiB) Viewed 140 times

jeremyzschau
 
Posts: 128
Joined: Fri Feb 27, 2015 11:00 pm

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Wed Aug 07, 2019 3:38 pm

Ugh. Sorry. It's a simple issue - you need to add the DotStar library to the Gemma.

Here's the general how to about adding libraries:
https://learn.adafruit.com/welcome-to-c ... -libraries
Note that the Gemma M0 is a "Non-Express" board, so you'll have to follow this process:
https://learn.adafruit.com/welcome-to-c ... ards-12-27

I know the DotStar isn't what you ultimately care about. But using it for some basic trouble shooting will be helpful. Also, going through this general process for installing libraries will be useful to know for future reference.

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Thu Aug 08, 2019 3:40 am

Thank you so much Carter. I am sorry I downloaded adafruit-circuitpython-bundle-py-20190807 and tried to drag lib folder to the gemma but there it says there is not enough free space. Two files on gemma M0
backup_code.py 2KB
boot_out.txt 78 bytes.

jeremyzschau
 
Posts: 128
Joined: Fri Feb 27, 2015 11:00 pm

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Thu Aug 08, 2019 10:48 am

This can always be a little tricky with the smaller non-Express boards. But also, various operating system can sometimes do fancy behind the scenes stuff that add hidden files and take up space. Check here:
https://learn.adafruit.com/welcome-to-c ... ards-20-39
and not the parts about Max OSX (look like you're using that?)

Hopefully something there will work to free up space so that you can copy the library file(s) over.

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Thu Aug 08, 2019 10:06 pm

Error.
Attachments
Screen Shot 2019-08-09 at 10.58.02 AM.png
Screen Shot 2019-08-09 at 10.58.02 AM.png (44.79 KiB) Viewed 91 times

jeremyzschau
 
Posts: 128
Joined: Fri Feb 27, 2015 11:00 pm

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Fri Aug 09, 2019 12:22 pm

The command was just an example:
Code: Select all | TOGGLE FULL SIZE
cp -rX folder_to_copy /Volumes/CIRCUITPY

replace folder_to_copy with the actual folder name you want to copy. Same for foo.py. Replace foo.py with the actual filename you want to copy.

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Sat Aug 10, 2019 8:24 am

Sorry I am trying.
Attachments
Screen Shot 2019-08-10 at 9.17.15 PM.png
Screen Shot 2019-08-10 at 9.17.15 PM.png (186.51 KiB) Viewed 66 times

jeremyzschau
 
Posts: 128
Joined: Fri Feb 27, 2015 11:00 pm

Re: Gemma M0 Test Code for Neopixels

by adafruit_support_carter on Mon Aug 12, 2019 1:39 pm

What is the lower right window? Is it some kind of archive viewer software? Are you actually extracting the contents of the zip file somewhere?
screen.jpg
screen.jpg (94.76 KiB) Viewed 47 times

adafruit_support_carter
 
Posts: 13216
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.