Oak

V1.0

🌳 Outdoor LoRa-GPS tracker with E-Ink display 🔑

power 18650
wireless LoRa
sensor GPS, E-Ink
mcu SAMD21G18
bom items 82
bom cost USD $78.93
vendors 6
status ongoing

Hello world blinky

blinky LED easy

Hello world with Blinky LED


Steps

  1. Plug in the Oak PCB to the computer
  2. Ensure the PCB can be detected with ls -al /dev/cu.usbmodem and arduino-cli board list Ensure the PCB can be detected with <code>ls -al /dev/cu.usbmodem</code> and <code>arduino-cli board list</code>
  3. Run make to upload the code
  4. (Option A) Watch the Blinky LED while the USB cable is plugged into the laptop
  5. (Option B) Plug out the USB and put in the 18650 battery to watch the blinky LED

Serial console

Serial output from the firmware.

Code

Download code
// PA14 is Pin 2
// https://github.com/arduino/ArduinoCore-samd/blob/master/variants/arduino_zero/variant.cpp#L26
#define LEDPIN 2

void setup() {
  pinMode(LEDPIN, OUTPUT);
  SerialUSB.begin(9600);
}

void loop() {
  digitalWrite(LEDPIN, HIGH);
  SerialUSB.println("HIGH");
  delay(2000);

  digitalWrite(LEDPIN, LOW);
  SerialUSB.println("LOW");
  delay(2000);
}

Makefile

BOARD?=arduino:samd:arduino_zero_native
PORT := $(shell ls /dev/cu.usbmodem*)
BUILD=build

.PHONY: default lint all flash clean

default: lint all flash clean

lint:
	cpplint --extensions=ino --filter=-legal/copyright,-whitespace/line_length,-readability/casting,-readability/todo *.ino

all:
	# This custom PCB does not have a crytal on pins PA00 and PA01
	# Hence, use -DCRYSTALLESS to replace the extra_flags in boards.txt
	arduino-cli compile --fqbn $(BOARD) --build-properties build.extra_flags="-DCRYSTALLESS -D__SAMD21G18A__ {build.usb_flags}"  --output-dir $(BUILD) ./

flash:
	arduino-cli upload -p $(PORT) --fqbn $(BOARD) --input-dir $(BUILD) --verbose

clean:
	rm -r build

References

Photos

Hello world blinky Photo 1
Hello world blinky Photo 2
Hello world blinky Photo 3