0

itSyBitSy help...
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

itSyBitSy help...

by mangoFPV on Wed Apr 25, 2018 10:07 pm

Hello!
Looking for some help...I'm just starting to learn microprocessors and need some help on building the LED trampoline tutorial, which looks promising for another project I'm currently working on that includes controlling LEDS. I purchased some Adafruit ItsyBitsy M0 and hit a wall at the "software" section of the tutorial. As I said I'm a noob to how python runs and can't get the sample code to run. I copied and saved it onto the Adafruit ItsyBitsy M0 board and also followed the "Welcome to Circuit Python" guide. Any help would be greatly appreciated...Thank you!

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by jerryn on Thu Apr 26, 2018 6:30 am

Can you provide more information about what you are doing to try to run the software and what errors you are seeing?
Are you using the example LED_Trampoline.py with NO modifications.
If there have been any changes, please post them as well.

jerryn
 
Posts: 725
Joined: Sat Sep 14, 2013 9:05 am

Re: itSyBitSy help...

by mangoFPV on Thu Apr 26, 2018 2:36 pm

jerryn wrote:Can you provide more information about what you are doing to try to run the software and what errors you are seeing?
Are you using the example LED_Trampoline.py with NO modifications.
If there have been any changes, please post them as well.


G'morning and thank you for viewing my white flag Jerryn...No errors as of yet, just wanted to know how to make the code run from the itsybitsy board and yes LED_Trampoline.py with NO modifications? I did copy the code.py sample from here: https://learn.adafruit.com/led-trampoline/software and saved it on to my Itsy board, but had no luck in firing it off. I'm really a noob at this but trying to challenge myself to learn some microprocessor stuff. Again thanks for anyone's help...

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by mangoFPV on Thu Apr 26, 2018 8:26 pm

actually here is the code error I was getting. [G:] is the isybitsy board mo:
C:\Python27\python.exe G:/LED_Trampoline.py
File "G:/LED_Trampoline.py", line 47
yield from seq
^
SyntaxError: invalid syntax

Process finished with exit code 1

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by jerryn on Thu Apr 26, 2018 11:00 pm

It looks like you are trying to run the code on you host system from the mounted G: drive.
That is not how it works. The LED_Trampoline.py runs on the Itsybitsy board.
Have you followed the guide https://learn.adafruit.com/welcome-to-circuitpython?view=all#the-repl you can use the REPL to see code run.

Use
Code: Select all | TOGGLE FULL SIZE
import LED_Trampoline


Did you also copy the necessary library files for this program. You will need neopixel.mpy from the “bundle”. See the section on libraries in the same guide. It may have been “pre-installed”

Edited to add. It makes a big difference if you name the file code.py. In that case it will start automatically every time you reset the board.

If neopixel.mpy is not there, it will fail.
Good luck!

jerryn
 
Posts: 725
Joined: Sat Sep 14, 2013 9:05 am

Re: itSyBitSy help...

by adafruit_support_carter on Thu Apr 26, 2018 11:54 pm

Here's more info on what filenames will be run automatically at power on / reboot:
https://learn.adafruit.com/welcome-to-c ... ogram-file

Accessing the REPL and doing the import as @jerryn showed works as well and let's you use whatever file names you want. That can be useful if you don't actually want the program to start automatically. Like for initial testing and working out bugs. Then, once you've seen it works OK, you can rename it to one of the above names for when you're ready to disconnect from the host computer and run stand alone off batteries.

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

Re: itSyBitSy help...

by mangoFPV on Fri Apr 27, 2018 5:38 pm

Thank you so much! I will check these out and report..

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by mangoFPV on Fri Apr 27, 2018 8:47 pm

jerryn wrote:It looks like you are trying to run the code on you host system from the mounted G: drive.
That is not how it works. The LED_Trampoline.py runs on the Itsybitsy board.
Have you followed the guide https://learn.adafruit.com/welcome-to-circuitpython?view=all#the-repl you can use the REPL to see code run.

Use
Code: Select all | TOGGLE FULL SIZE
import LED_Trampoline


Did you also copy the necessary library files for this program. You will need neopixel.mpy from the “bundle”. See the section on libraries in the same guide. It may have been “pre-installed”

Edited to add. It makes a big difference if you name the file code.py. In that case it will start automatically every time you reset the board.

If neopixel.mpy is not there, it will fail.
Good luck!



Hi Jerryn!
Thank you for the earlier links! I'm following the "Welcome to CircuitPython" lesson and seems like I'm currently stuck on setting up my environment and entering the "device path" in the pyCharm under Languages&Frameworks/MicroPython? I can see the itsybits board in my device manager(COM3) and typed in COM3 in the device path section but everytime I press "detect". Its says "No devices detected. Specify the device path manually." Would you know what else it would be for a windows 7 machine? Can't really find answers on the Google. Thanks again!

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by jerryn on Fri Apr 27, 2018 9:49 pm

I have not used pycharm. I recommend using mu or putty to access the REPL. See the advanced REPL section of the guide.
https://learn.adafruit.com/welcome-to-circuitpython?view=all#advanced-serial-console-on-windows
Also, have you installed the windows 7 drivers? https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython#windows-7-drivers
I am not a windows user, so I can’t give specific advice.


Don’t get discouraged! We’ll get there!

jerryn
 
Posts: 725
Joined: Sat Sep 14, 2013 9:05 am

Re: itSyBitSy help...

by mangoFPV on Mon Apr 30, 2018 6:26 pm

jerryn wrote:I have not used pycharm. I recommend using mu or putty to access the REPL. See the advanced REPL section of the guide.
https://learn.adafruit.com/welcome-to-circuitpython?view=all#advanced-serial-console-on-windows
Also, have you installed the windows 7 drivers? https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython#windows-7-drivers
I am not a windows user, so I can’t give specific advice.


Don’t get discouraged! We’ll get there!


Hello,
Thanks for replying and the words of encouragement. I followed the links you sent and after running putt was able to connect to the ItsBtsy Mo board. My screen came back with this (see image attached). Just wondering what I should do now? Thanks for your help.
Attachments
screengrab.jpg
screengrab.jpg (96.13 KiB) Viewed 304 times

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by adafruit_support_carter on Mon Apr 30, 2018 7:06 pm

Post the contents of your main.py file.

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

Re: itSyBitSy help...

by mangoFPV on Mon Apr 30, 2018 7:12 pm

adafruit_support_carter wrote:Post the contents of your main.py file.

Thank you! I attached it.
main.zip
(1.58 KiB) Downloaded 10 times

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by adafruit_support_carter on Mon Apr 30, 2018 7:17 pm

You are already using D5. See line 25:
Code: Select all | TOGGLE FULL SIZE
led = DigitalInOut(board.D5)

And then you try to use it again for your NeoPixels:
Code: Select all | TOGGLE FULL SIZE
neopixels = neopixel.NeoPixel(board.D5, NUMPIXELS, brightness=0.2, auto_write=False)


What do you actually have connected to D5?

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

Re: itSyBitSy help...

by mangoFPV on Mon Apr 30, 2018 8:21 pm

adafruit_support_carter wrote:You are already using D5. See line 25:
Code: Select all | TOGGLE FULL SIZE
led = DigitalInOut(board.D5)

And then you try to use it again for your NeoPixels:
Code: Select all | TOGGLE FULL SIZE
neopixels = neopixel.NeoPixel(board.D5, NUMPIXELS, brightness=0.2, auto_write=False)


What do you actually have connected to D5?


I had it wired as so from following the LED_trampoline tutorial, using baord.d10, but is said if that's not working use "board.d5", it goes to the DO connection of my 60 leds
circuit.jpg
circuit.jpg (653.5 KiB) Viewed 286 times

mangoFPV
 
Posts: 16
Joined: Wed Apr 18, 2018 7:31 pm

Re: itSyBitSy help...

by adafruit_support_carter on Mon Apr 30, 2018 11:56 pm

Can you post another photo of your Itsy Bitsy showing how you've soldered on the header pins. It's a little hard to tell in that photo, and I want to make sure they're OK.

Yep, the guide mentions switching from pin D10 to pin D5 for the NeoPixels. You would do that by changing the first argument in the setup of the NeoPixels as you've done in this line:
Code: Select all | TOGGLE FULL SIZE
neopixels = neopixel.NeoPixel(board.D5, NUMPIXELS, brightness=0.2, auto_write=False)

The code in the guide does it by using the variable pixel_pin.

Why are you also trying to set up another led on pin D5?

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

Please be positive and constructive with your questions and comments.