Question about the Powerboost part used with the fairy wings project

Wearable electronics: boards, conductive materials, and projects from Adafruit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

Do do I type each of the PRINT items into REPL? Or does it automatically go there when I go into REPL? When I did print("Hello, CircuitPython!") All it did was give me a line that said Hello, CircuitPython!

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

I tried entering the first print command in the code and this is what it shows.

>>> print("Flapping", num_flaps, "times")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'num_flaps' is not defined

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by dastels »

Oh. Sorry, you misunderstand. I am wondering what gets output to the REPL when you run you wing code. Connect to the REPL with code.py containing your wing code. Then CTRL-D when you get the >>> prompt. That'll load and run code.py and any output from it will show up in the REPL.

Dave

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

Ahh! Thanks for the clarification! This is what is shows. So does this mean the code is working properly and that the problem is elsewhere?

Adafruit CircuitPython 7.3.2 on 2022-07-20; Adafruit Feather M4 Express with samd51j19
>>>
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Code done running.

Press any key to enter the REPL. Use CTRL-D to reload.

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by dastels »

Seeing "Code done running" is unexpected. As is not seeing any output from the print calls.

Are you sure you have the right code in CIRCUITPY/code.py? Is there also a CIRCUITPY/main.py? It looks like it's running an empty code file.

Dave

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

I used the project bundle and code from here. My folders on CircuitPy are set up the exact same way

https://learn.adafruit.com/animatronic- ... w=all#code

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by dastels »

Huh. Can you post a list (screenshot is good) of what's on CIRCUITPY?

Dave

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

Absolutely
Attachments
wing register.PNG
wing register.PNG (16.6 KiB) Viewed 202 times
wing folder 2.PNG
wing folder 2.PNG (19.98 KiB) Viewed 202 times
first wing folder.PNG
first wing folder.PNG (26.24 KiB) Viewed 202 times

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

Last 2 screen shots
Attachments
motor.PNG
motor.PNG (10.9 KiB) Viewed 202 times
bus device.PNG
bus device.PNG (10.31 KiB) Viewed 202 times

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by dastels »

Looks as it should. Now, the contents of CIRCUITPY/code.py, please.

Dave

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

CIRCUITPY code
Attachments
code.py
(1.73 KiB) Downloaded 6 times

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by dastels »

I'm a little baffled. The code you attached should never result in "Code done running".
You're clearly connected to the REPL on the Feather. I wonder if the following line is messing it up:

Code: Select all

#print(DELAY\
Try removing it. I know it's commented, but the '\' might be confusing things.

Dave

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

Giving it a try now

User avatar
Froggy92030
 
Posts: 97
Joined: Wed Apr 20, 2022 8:25 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by Froggy92030 »

Ok so I made the edit you suggested and tried my servos. Still nothing. I then ran it through REPL again and got the same "code done running" result

User avatar
dastels
 
Posts: 15608
Joined: Tue Oct 20, 2015 3:22 pm

Re: Question about the Powerboost part used with the fairy wings project

Post by dastels »

That's bizarre.

Add some more print calls before the loop. Before & after initializing analog_in and kit. and just befoer the loop.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Wearables”