# Setting up an Adafruit Feather M0 Bluefruit LE as a Firmata device

**URL:** https://mworks.discourse.group/t/setting-up-an-adafruit-feather-m0-bluefruit-le-as-a-firmata-device/59
**Category:** I/O Devices
**Created:** [August 18, 2020, 7:29pm UTC](https://mworks.discourse.group/t/setting-up-an-adafruit-feather-m0-bluefruit-le-as-a-firmata-device/59 "2020-08-18T19:29:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [August 18, 2020, 7:29pm UTC](https://mworks.discourse.group/t/setting-up-an-adafruit-feather-m0-bluefruit-le-as-a-firmata-device/59/1 "2020-08-18T19:29:11Z")

</div>

The [Adafruit Feather M0 Bluefruit LE](https://www.adafruit.com/product/2995) is a good choice for use with MWorks’ [Firmata interface](https://mworks.github.io/documentation/latest/components/firmata_device.html), particularly if you need to connect via Bluetooth Low Energy (BLE). The following steps detail how to prepare your board for this role. (If you’re using a different board, see the [general Firmata setup guide](https://mworks.discourse.group/t/setting-up-an-arduino-or-compatible-microcontroller-as-a-firmata-device/57).)

1. [Update the BLE firmware](https://learn.adafruit.com/introducing-adafruit-ble-bluetooth-low-energy-friend/dfu-on-ios). This is very important, as new boards purchased in 2019 are still shipping with BLE firmware from 2015, which is _not_ adequate for MWorks’ needs.

2. [Install and set up the Arduino IDE](https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/setup).

3. [Install support for the Feather M0](https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/using-with-arduino-ide) in the Arduino IDE.

4. [Install the Adafruit nRF51 BLE library](https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/installing-ble-library). (Note: You can also install this via the Arduino IDE’s Library Manager. Just be sure to install version 1.9.6 or later.)

5. Install the latest version of the Firmata library with MWorks extensions: [Download](https://github.com/mworks/mworks-firmata-arduino/archive/master.zip) and decompress the source code, change the name of the source folder to “Firmata”, and move it to `$HOME/Documents/Arduino/libraries` (i.e. the same folder as `Adafruit_BluefruitLE_nRF51`).

6. Quit and restart the Arduino IDE.

7. Connect the Feather M0 board to your computer via a USB cable.

8. Go to Tools → Board, and, in the “Adafruit SAMD” section, select “Adafruit Feather M0”.

9. Under Tools → Port, select the port that has “Adafruit Feather M0” next to it in parentheses.

10. The next step depends on how you’ll be connecting to your board from the machine running MWorks. If you’ll be…

11. (BLE only) Click on the tab for file `bleConfig.h`. Change the value of `FIRMATA_BLE_LOCAL_NAME` from `FIRMATA` to something unique for your board. Next, find the line

12. Click the “Upload” button (rightward-pointing arrow). This will compile and upload the StandardFirmata or StandardFirmataBLE code to your board. (After uploading, you may see a message saying “Disk Not Ejected Properly”. You can safely ignore this.)

13. Disconnect the board from your computer, and quit the Arduino IDE.

At this point, your board should be ready to use as a Firmata device. To test it, reconnect it to your computer via its USB cable, and try running the [Firmata blink](https://mworks.discourse.group/uploads/short-url/zfAEQdBbjwCZPLl7cR7KzCVwjfd.zip) demo experiment. This experiment toggles the state of digital pin 13 (which is connected to a built-in LED) every 500ms. If you’re connecting via BLE, be sure to set the value of the macro `bluetooth_local_name` to the string you used as `FIRMATA_BLE_LOCAL_NAME` in `bleConfig.h`.

If you run into problems at any point, please [get in touch](https://mworks.discourse.group/c/support/5).

---

<div class="post-metadata">

### Author: ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)
#### Post date: [July 20, 2022, 4:03pm UTC](https://mworks.discourse.group/t/setting-up-an-adafruit-feather-m0-bluefruit-le-as-a-firmata-device/59/2 "2022-07-20T16:03:43Z")

</div>


