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 19, 2019 10:17 pm

That one isn't a Python command. It's a linux command, so run it back out in the command line here:
screen8.png
screen8.png (14.2 KiB) Viewed 155 times

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

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Mon Aug 19, 2019 10:22 pm

Please check.
Attachments
Screen Shot 2019-08-20 at 11.16.49 AM.png
Screen Shot 2019-08-20 at 11.16.49 AM.png (72.88 KiB) Viewed 154 times

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 20, 2019 12:52 am

OK. And now:
Code: Select all | TOGGLE FULL SIZE
ls /Volumes/CIRCUITPY/lib/*

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

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Tue Aug 20, 2019 1:33 am

Please check.
Attachments
Screen Shot 2019-08-20 at 2.27.54 PM.png
Screen Shot 2019-08-20 at 2.27.54 PM.png (80 KiB) Viewed 143 times

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 20, 2019 12:42 pm

Hmmmm. Ok, I think what is happening at this point is that you've somehow created /Volumes/CIRCUITPY/lib, but it's not actually a folder. Looking at the icon here:
screenshot_folder.png
screenshot_folder.png (28.75 KiB) Viewed 131 times

it looks like it might be a file instead.

Here is a series of commands to delete it, then re-create it as a folder, re-do the copy of the library file, and a final ls to verify that it's there:
Code: Select all | TOGGLE FULL SIZE
rm -rf /Volumes/CIRCUITPY/lib
mkdir /Volumes/CIRCUITPY/lib
cp -X ./lib/adafruit_dotstar.mpy /Volumes/CIRCUITPY/lib/
ls /Volumes/CIRCUITPY/lib/*

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

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Tue Aug 20, 2019 9:31 pm

Please check.
Attachments
Screen Shot 2019-08-21 at 10.25.20 AM.png
Screen Shot 2019-08-21 at 10.25.20 AM.png (979.43 KiB) Viewed 124 times

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 20, 2019 11:15 pm

Excellent. That's looking better. Now try the DotStar example again:

Screenshot from 2019-08-06 07-25-17.png
Screenshot from 2019-08-06 07-25-17.png (84.84 KiB) Viewed 118 times

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

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Tue Aug 20, 2019 11:47 pm

The large LED on the gemma is now blue.
Attachments
Screen Shot 2019-08-21 at 12.41.07 PM.png
Screen Shot 2019-08-21 at 12.41.07 PM.png (204.43 KiB) Viewed 116 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 21, 2019 11:36 am

Yeah! So it's all working now for the DotStar. You can play around changing it to other colors if you want. Here's red:
Code: Select all | TOGGLE FULL SIZE
led.fill(0xFF0000)

and green:
Code: Select all | TOGGLE FULL SIZE
led.fill(0x00FF00)


Once you're done playing around with that, go back and see if you can copy over the neopixel library and then we can try getting the NeoPixel to work.

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

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Wed Aug 21, 2019 10:40 pm

The red and green colors on the large gemma LED worked.
Attachments
Screen Shot 2019-08-22 at 11.34.47 AM.png
Screen Shot 2019-08-22 at 11.34.47 AM.png (323.07 KiB) Viewed 93 times

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 22, 2019 11:12 am

You'll need to copy over the neopixel library. There are two things to remember. Since you are using a non-Express board there isn't enough room for the entire library bundle (i.e. the lib folder in the bundle zip file), so you'll have to copy each library one at a time:
https://learn.adafruit.com/welcome-to-c ... ards-12-27
And since you are on a Mac, you'll have to use the cp command to prevent Mac OS from also copying over a lot of Mac OS bloat:
https://learn.adafruit.com/welcome-to-c ... ards-20-39
This is the same general process you followed above to copy over the DotStar library.

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

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Thu Aug 22, 2019 8:13 pm

I'm sorry after reading everything from the two links I do not understand what to follow and what to ignore. Can you please post exactly what I need to do?
Attachments
Screen Shot 2019-08-23 at 9.11.02 AM.png
Screen Shot 2019-08-23 at 9.11.02 AM.png (592.36 KiB) Viewed 78 times

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 22, 2019 8:53 pm

Get back to your command line to where you are sitting in the same location as here:
cli.jpg
cli.jpg (27.83 KiB) Viewed 72 times

and then you should be able to just run:
Code: Select all | TOGGLE FULL SIZE
cp -X ./lib/neopixel.mpy /Volumes/CIRCUITPY/lib/

to copy over the NeoPixel library.

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

Re: Gemma M0 Test Code for Neopixels

by jeremyzschau on Thu Aug 22, 2019 9:02 pm

Please check.
Attachments
Screen Shot 2019-08-23 at 9.56.33 AM.png
Screen Shot 2019-08-23 at 9.56.33 AM.png (355.56 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 Thu Aug 22, 2019 9:32 pm

OK, we can try the external NeoPixel(s) now. Post another photo showing how they are currently wired to the Gemma. Want to make sure we use the correct pins.

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

Please be positive and constructive with your questions and comments.


cron