Commit 4c703c82 authored by Erik Strand's avatar Erik Strand
Browse files

Add an example Arduino sketch

parent fc66889f
......@@ -39,7 +39,8 @@ To write code and load it, Jake uses [PlatformIO](
We're not going to beat Adafruit's documentation on setting up the Arduino IDE, so just take a
gander over
[here]( It's
their bootloader, after all.
their bootloader, after all. An example sketch lives in the [blink-arduino](blink-arduino)
### Real Registers in an Arduino World
# Programming with the Arduino IDE
This doc assumes you've already burned an Arduino compatible bootloader on your board, and set up
the Arduino IDE to talk to it. If you still need to do this, check out the README one level up.
After that, just select the right settings in the Arduino IDE tools menu and you're good to go:
- Board: Adafruit Feather M4 Express (SAMD51)
- Port: depends on your OS, but it should say Adafruit Feather M4 Express (SAMD51) somewhere
- Programmer: USBtinyISP
The other settings are up to you. Defaults are fine.
![Arduino IDE](img/arduino_ide.jpg)
Note that this blinky sketch is fancy, and prints "hello world" over USB serial. To see it, you can
use the Arduino IDE's serial monitor. Getting this to work would be a lot more difficult without the
Arduino libraries.
#define RED_LED 25
#define GREEN_LED 9
void setup() {
// This turns off the LEDs.
digitalWrite(RED_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
void loop() {
digitalWrite(RED_LED, LOW);
digitalWrite(GREEN_LED, LOW);
Serial.println("hello world");
digitalWrite(RED_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment