Flashing the FED3.2 device

36 views
Skip to first unread message

Andreas Hüsgen

unread,
Dec 10, 2025, 9:35:43 AMDec 10
to FEDforum
Hi everyone,

we are currently working on a FED3 related project, for which we need to flash a customized sketch to the FED3. So far, we had a FED3.1 for lying around illustrative purposes. This one had a separate Adalogger Feather M0 board piggybacked to the main board.

Today, we received our new FED3.2 devices and were surprised that everything is now integrated into one custom board.

I just wanted to verify that the setup instructions in the video "How to set up your computer to flash code onto FED3" (https://www.youtube.com/watch?v=i0XzUFdMASA) are still accurate and that the new board behaves just as the Adalogger Feather M0.

I do not want to brick our shiny new device within the first 30 minutes ;)

Many thanks in advance!

Best Regards,

Andreas

Lex

unread,
Dec 10, 2025, 2:11:59 PMDec 10
to Andreas Hüsgen, FEDforum
Hi Andreas - yes this is the same chip and everything should work the same.  OEPS made the update as it will make their workflow for building the device easier and more in their control, vs. sourcing completed parts like the Adalogger from Adafruit.  From their website, the improvements in v3.2 include:
  • More resistant mouthpiece made out of Titanium which does not corrode (on orders placed after Nov 3rd).

  • USB connector upgraded to the latest USB-C type

  • Single USB port for both charging + programming.

  • Standard I2C connector for environment sensors (temperature & humidity). You can get the sensor here and the cable for it here.

  • Improved battery management and 4× faster charging

Have fun! -Lex

--
You received this message because you are subscribed to the Google Groups "FEDforum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fedforum+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fedforum/41022758-b290-4ed5-b51a-a65cc289a4c7n%40googlegroups.com.

Andreas Hüsgen

unread,
Dec 12, 2025, 9:15:14 AMDec 12
to FEDforum
Hi Lex,

thank you very much for your quick reply! Today, I managed to flash my first programs to the FED3.2 by following your nice video :)

I ran into two problems, which I would like to point out in case somebody else has to deal with the same issues. 
I use Linux Mint and installed the Arduino IDE using the package manager, not from the Arduino homepage, so maybe some of these issues are
related to my operating system or the version of the Arduino IDE.

The first problem was easy to fix. When I tried to flash FixedRatio1 to the device, my Arduino IDE told me that Stepper.h was missing.
I fixed this by installing the Stepper library from Arduino by hand via the "Manage Library".

The second problem was that the device would only sometimes register correctly with my computer. After pressing the button next to the SD-Card slot twice, the
red LED would sometimes not breeze but instead flash rapidly and no port appeared in the Arduino IDE. The logs of my computer (dmesg) showed that the
device connected but then after a few seconds disconnected again

[ 8731.342136] usb 3-5: USB disconnect, device number 26
[ 8732.148760] usb 3-5: new full-speed USB device number 27 using xhci_hcd
[ 8732.343845] usb 3-5: New USB device found, idVendor=239a, idProduct=800b, bcdDevice= 1.00
[ 8732.343857] usb 3-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 8732.343860] usb 3-5: Product: Feather M0
[ 8732.343863] usb 3-5: Manufacturer: Adafruit
[ 8732.343866] usb 3-5: SerialNumber: A3A018CB50305250462E3120FF071311
[ 8732.348763] cdc_acm 3-5:1.0: ttyACM0: USB ACM device
[ 8736.434280] usb 3-5: USB disconnect, device number 27
[ 8760.867983] usb 3-5: new full-speed USB device number 30 using xhci_hcd

Also, after successfully flashing a program,  the serial monitor in the Arduino IDE failed to connect to the FED3 or the connection would fail after a few seconds. The
device /dev/ttyACM0 (which represents the FED3 under Linux) would also disappear.

I did some debugging and it looks like the way, the FED3::run() method is implemented, causes these issues. I did not look into the code, yet, but if I see it correctly, the method blocks the main loop until
something interesting (triggering a poke) happens. At least on Linux, this makes the operating system disconnect from the FED3. By removing FED3::run() from the code and just using a very
simple program of the form

void loop() {
  Serial.println("hello");
  delay(500);
}

The device stayed connected to my PC for the last hour.

If you use the FED3 as a standalone device, this is probably not an issue. Also, Windows and MacOS might behave differently in this regard. Since we want to hook up the FED3 to a Raspberry Pi, we
will probably have to tweak the FED3 library a bit. This, however, is less of an issue than having problematic hardware.

Best Regard,

Andreas

Lex

unread,
Dec 12, 2025, 10:20:56 AMDec 12
to Andreas Hüsgen, FEDforum
Thanks for the detailed writeup Andreas!  I haven't used the Arduino IDE on Linux before but on Windows and Mac stepper.h is a built in library that shouldn't need to be installed separately.  Maybe that's a Linux thing?  

The difficulty in getting it into bootloader mode (the mode where it can accept code after a button double click) seems more concerning but I haven't experienced this on my Windows machine, I'm hoping that's also a Linux thing :) 

I do have an explanation about why the Serial port drops after a few seconds:  Dropping the Serial connection is a documented issue that happens when the SAMD21 processor in the FED3 goes to sleep - when it wakes up it doesn't automatically reconnect Serial.  And we put the processor to sleep in the run() function to preserve battery life, which explains why you tracked it down to the run() function.  There are some forum posts that suggest a workaround but it's time consuming (>0.5s) to reconnect and the approach looks complicated so I never tried implementing it.  

The alternative if you need the Serial connection to remain active is to disable sleeping on the FED3.  I made a function disableSleep for this that you can call in your setup() function right after fed3.begin, and cause the device to skip over the sleep call: 
fed3.begin();
fed3.disableSleep();

Disabling sleep will drain the battery ~3x faster, resulting in an expected battery life of ~2-3 days, but if you're planning to use these always connected by USB this shouldn't be a problem! -Lex

Andreas Hüsgen

unread,
Dec 12, 2025, 10:30:05 AMDec 12
to FEDforum
Hi Lex,

yes, I think that is exactly the problem. After looking into the run() function, the goToSleep() function catched my eye and I also found the disableSleep() function.
Disabling sleep appears to solve the problem! At least that is what my initial tests tell me.

I do not understand the flashing-problem thoroughly, yet, but my assumption is that you have to double-press the flash button before
the program goes to sleep the first time. So the following sequence should work reliably:

  • move the on-off-switch to off
  • connect the device via USB to the computer
  • move the switch to on
  • within the first two seconds, double-click the flash button
Best Regards,

Andreas
Reply all
Reply to author
Forward
0 new messages