Question about the Powerboost part used with the fairy wings project
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
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!
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
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
>>> print("Flapping", num_flaps, "times")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'num_flaps' is not defined
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Question about the Powerboost part used with the fairy wings project
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
Dave
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
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.
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.
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Question about the Powerboost part used with the fairy wings project
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
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
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
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
https://learn.adafruit.com/animatronic- ... w=all#code
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Question about the Powerboost part used with the fairy wings project
Huh. Can you post a list (screenshot is good) of what's on CIRCUITPY?
Dave
Dave
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
Absolutely
- Attachments
-
- wing register.PNG (16.6 KiB) Viewed 203 times
-
- wing folder 2.PNG (19.98 KiB) Viewed 203 times
-
- first wing folder.PNG (26.24 KiB) Viewed 203 times
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
Last 2 screen shots
- Attachments
-
- motor.PNG (10.9 KiB) Viewed 203 times
-
- bus device.PNG (10.31 KiB) Viewed 203 times
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Question about the Powerboost part used with the fairy wings project
Looks as it should. Now, the contents of CIRCUITPY/code.py, please.
Dave
Dave
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
CIRCUITPY code
- Attachments
-
- code.py
- (1.73 KiB) Downloaded 6 times
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Question about the Powerboost part used with the fairy wings project
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: Try removing it. I know it's commented, but the '\' might be confusing things.
Dave
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\
Dave
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
Giving it a try now
- Froggy92030
- Posts: 97
- Joined: Wed Apr 20, 2022 8:25 pm
Re: Question about the Powerboost part used with the fairy wings project
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
- dastels
- Posts: 15608
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Question about the Powerboost part used with the fairy wings project
That's bizarre.
Add some more print calls before the loop. Before & after initializing analog_in and kit. and just befoer the loop.
Dave
Add some more print calls before the loop. Before & after initializing analog_in and kit. and just befoer the loop.
Dave
Please be positive and constructive with your questions and comments.