problem with feather m4 express for fairy wings

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
fairywings82
 
Posts: 12
Joined: Tue Aug 16, 2022 2:55 pm

problem with feather m4 express for fairy wings

Post by fairywings82 »

Hi everyone,

I am making the fairy wings project that is posted on adafruit's website. I am a complete beginner so all of this stuff is new to me. Anyhow, I cannot seem to calibrate the servos or even get them to move. I thought I programmed the feather express but when I plug it into my computer via usb, the light flashes green, purple then yellow and another yellow. I don't really know what I'm doing wrong.

I took screen shots which I attached to this post and I will also describe what I'm seeing.

CIRCUITPY
adafruit-circuitpython-fea..._express-en_US-7.3.3.uf2
boot_out.txt
code.py
code.py.sb-c1cde9e8-djhPI7
code.py.sb-c1cde9e8-RdQ02h
code.py.sb-c1cde9e8e-y2An6w
lib

_______
the lib folder has this stuff:
adafruit_bus_device
adafruit_motor
adafruit_pca9685.mpy
adafruit_register
adafruit_servokit.mpy

if I try to open these files my macbook asks me what program do you want to open the file in and I have no idea what program/application to use or if I should even be opening these files
________

the code.py file just has exactly what I cut and pasted from adafruit's website
______

Thanks in advance for your help :)
Attachments
Screen Shot 2022-10-18 at 2.11.12 PM.png
Screen Shot 2022-10-18 at 2.11.12 PM.png (210.13 KiB) Viewed 255 times
Screen Shot 2022-10-18 at 2.11.02 PM.png
Screen Shot 2022-10-18 at 2.11.02 PM.png (162.77 KiB) Viewed 255 times
Screen Shot 2022-10-18 at 2.10.52 PM.png
Screen Shot 2022-10-18 at 2.10.52 PM.png (224.64 KiB) Viewed 255 times

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

Re: problem with feather m4 express for fairy wings

Post by dastels »

You should see what is being output in the REPL when you get those flashing colors (they indicate an error).
You can't do anything with MPY files. They are precompiled python code which are smaller to store, faster to load, and don't take memory to compile when they are loaded.

The first things to do is figure out that error.

Dave

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: problem with feather m4 express for fairy wings

Post by adafruit_support_carter »

This behavior:
the light flashes green, purple then yellow and another yellow
sounds like an error code being displayed on the RGB LED.

Also seeing that you have the CircuitPython firmware UF2 file (adafruit-circuitpython-feather_m4_express-en_US-7.3.3.uf2) sitting in the CIRCUITPY folder. That indicates the board was not put into bootloader mode first - which should show a folder named BOOT.

Let's get that sorted first. Go ahead and just delete the .uf2 file sitting in the CIRCUITPY folder. Then, go back to this part of the guide:
https://learn.adafruit.com/animatronic- ... m4-express
and make sure you are getting into bootloader mode, see the folder with BOOT in the name, and drag the .uf2 file to that.

User avatar
fairywings82
 
Posts: 12
Joined: Tue Aug 16, 2022 2:55 pm

Re: problem with feather m4 express for fairy wings

Post by fairywings82 »

Thanks for helping me.

So I deleted the UF2 file. I don't see a boot folder. I only have boot_out.txt Do you know how I can get into boot mode?

User avatar
fairywings82
 
Posts: 12
Joined: Tue Aug 16, 2022 2:55 pm

Re: problem with feather m4 express for fairy wings

Post by fairywings82 »

Should I erase everything from it and start over? If yes, can you please tell me how to do that step by step? Thanks

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: problem with feather m4 express for fairy wings

Post by adafruit_support_carter »

Do you know how I can get into boot mode?
Double press the reset button.
https://learn.adafruit.com/animatronic- ... m4-express

User avatar
fairywings82
 
Posts: 12
Joined: Tue Aug 16, 2022 2:55 pm

Re: problem with feather m4 express for fairy wings

Post by fairywings82 »

Hi,

So I pressed reset twice and it's blinking green. When I click on it, it doesn't say featherboot, it just says circuitpy. Should I disconnect it and press reset again or should I delete everything off of it and then disconnect, reconnect and press reset again? Sorry for all of the questions but I'm not sure what I'm doing wrong.

Thanks
Attachments
Screen Shot 2022-10-19 at 10.35.14 AM.png
Screen Shot 2022-10-19 at 10.35.14 AM.png (148.53 KiB) Viewed 222 times

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

Re: problem with feather m4 express for fairy wings

Post by dastels »

As the guide says, try different timing with the double-presses. It should mount a drive named FEATHERBOOT.

Dave

User avatar
fairywings82
 
Posts: 12
Joined: Tue Aug 16, 2022 2:55 pm

Re: problem with feather m4 express for fairy wings

Post by fairywings82 »

thanks Dave, two fast clicks worked. fingers crossed I can get this working

User avatar
fairywings82
 
Posts: 12
Joined: Tue Aug 16, 2022 2:55 pm

Re: problem with feather m4 express for fairy wings

Post by fairywings82 »

Hi,

I have the servos working and they are calibrated. I just have a quick question. When the motors are working, they pause when the wings are perpendicular to your shoulders. Is it possible to change part of the code so the pause happens when the wings are fully open or parallel to the shoulders? If this can be changed, can you please let me know exactly what I would have to change and where I could find it in the code. As always, thanks for the help. It is greatly appreciated.

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

Re: problem with feather m4 express for fairy wings

Post by dastels »

Just looking at the code, I'd say that the line near the end:

Code: Select all

 time.sleep(random.randint(2, 10))  # wait 2 to 10 seconds
could be moved to just after

Code: Select all

print("Close")
Dave

User avatar
fairywings82
 
Posts: 12
Joined: Tue Aug 16, 2022 2:55 pm

Re: problem with feather m4 express for fairy wings

Post by fairywings82 »

I moved the code as suggested and I got the dreaded blinking red light. I think I'm going to just leave it alone. Thanks for all of the help.

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

Re: problem with feather m4 express for fairy wings

Post by dastels »

If there's a problem with the code error information will get output to the REPL whick will tell you what's happening.

Dave

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

Return to “Wearables”