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