Adafruit ItsyBitsy M4

The Adafruit ItsyBitsy M4 is very compact ARM development board based on the Atmel SAMD51 family of SoC.

Interfaces

Interface Hardware Supported TinyGo Support
GPIO YES YES
UART YES YES
SPI YES YES
I2C YES YES
ADC YES YES
PWM YES YES

Flashing

UF2

The ItsyBitsy M4 comes with the UF2 bootloader already installed.

CLI Flashing on Linux

  • Plug your ItsyBitsy M4 into your computer’s USB port.
  • Flash your TinyGo program to the board using this command:

    tinygo flash -target=itsybitsy-m4 [PATH TO YOUR PROGRAM]
    
  • The ItsyBitsy M4 board should restart and then begin running your program.

CLI Flashing on macOS

In order to talk to flash the board using macOS, you need to discover how macOS system has named the serial port.

  • Plug your ItsyBitsy M4 into your computer’s USB port.
  • Run this command to display the connected USB devices:

    ls /dev | grep usb
    

    The above command should result in output like this:

    /dev/cu.usbmodem141201
    /dev/tty.usbmodem141201
    
  • Using this information, you should now be able to flash your TinyGo program to the board using this command:

    tinygo flash -target=itsybitsy-m4 -port=[PORT TO YOUR BOARD] [PATH TO YOUR PROGRAM]
    

    Replace [PORT TO YOUR BOARD] in the command above with the correct USB port name for your board.

  • The ItsyBitsy M4 board should restart and then begin running your program.

Troubleshooting

If you have troubles getting your ItsyBitsy M4 board to receive code, try this:

  • Press the “RESET” button on the board two times to get the ItsyBitsy M4 board ready to receive code.
  • The ItsyBitsy M4 board will appear to your computer like a USB drive.
  • Now try running the command as above:

    tinygo flash -target=itsybitsy-m4 [PATH TO YOUR PROGRAM]
    

Once you have updated your ItsyBitsy M4 board the first time, after that you should be able to flash it entirely from the command line.

Notes

You can use the USB port to the ItsyBitsy M4 as a serial port. UART0 refers to this connection.