aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSimon John <git@the-jedi.co.uk>2018-02-24 16:01:00 +0000
committerGitHub <noreply@github.com>2018-02-24 16:01:00 +0000
commit80b81672062c3729a14a07dbc2c933d823e6c0b8 (patch)
tree3bde2adcc00485a98da3f74839462238d42c38ee /examples
parent84803734779ddb4af0b8afb1f7de4c9d15771859 (diff)
parentf80486609505876fb0f103c3c1d03aba8f6a0f79 (diff)
Merge pull request #543 from tuna-f1sh/sam
Arduino Atmel SAM family Support (ARM architecture) Thanks @tuna-f1sh !
Diffstat (limited to 'examples')
-rw-r--r--examples/MZeroBlink/MZeroBlink.ino19
-rw-r--r--examples/MZeroBlink/Makefile24
-rw-r--r--examples/ZeroBlink/Makefile30
-rw-r--r--examples/ZeroBlink/ZeroBlink.ino19
4 files changed, 92 insertions, 0 deletions
diff --git a/examples/MZeroBlink/MZeroBlink.ino b/examples/MZeroBlink/MZeroBlink.ino
new file mode 100644
index 0000000..f9a59a9
--- /dev/null
+++ b/examples/MZeroBlink/MZeroBlink.ino
@@ -0,0 +1,19 @@
+/*
+ Blink
+ Turns on an LED on for one second, then off for one second, repeatedly.
+
+ This example code is in the public domain.
+ */
+
+void setup() {
+ // initialize the digital pin as an output.
+ // Pin 13 has an LED connected on most Arduino boards:
+ pinMode(13, OUTPUT);
+}
+
+void loop() {
+ digitalWrite(13, HIGH); // set the LED on
+ delay(1000); // wait for a second
+ digitalWrite(13, LOW); // set the LED off
+ delay(1000); // wait for a second
+}
diff --git a/examples/MZeroBlink/Makefile b/examples/MZeroBlink/Makefile
new file mode 100644
index 0000000..29cb90b
--- /dev/null
+++ b/examples/MZeroBlink/Makefile
@@ -0,0 +1,24 @@
+# Arduino M0 Pro Programming Port
+BOARD_TAG = mzero_pro_bl_dbg
+
+# Define debug if you want to use gdb
+#DEBUG = 1
+
+# Define port if using Black Magic Probe rather than default localhost:3333
+#GDB_PORT = /dev/ttyACM0
+
+# Define ARM toolchain dir if not using Arduino supplied
+#ARM_TOOLS_DIR = /usr
+
+# Define AVR toolchain dir if not using Arduino supplied and using native port
+#AVR_TOOLS_DIR = /usr
+
+# Define Arduino support package installation path where SAM device support has been installed
+# Linux
+# ARDUINO_PACKAGE_DIR := $(HOME)/.arduino15/packages
+# macOS
+# ARDUINO_PACKAGE_DIR := $(HOME)/Library/Arduino15/packages
+# Windows
+# ARDUINO_PACKAGE_DIR := "C:/Users/$(USER)/AppData/Local/Arduino15/packages"
+
+include ../../Sam.mk
diff --git a/examples/ZeroBlink/Makefile b/examples/ZeroBlink/Makefile
new file mode 100644
index 0000000..60c8435
--- /dev/null
+++ b/examples/ZeroBlink/Makefile
@@ -0,0 +1,30 @@
+# Arduino Zero Native Port (should work with Feather, MKR1000 etc.)
+# BOOTLOADER: The bootloader on these devices loaded when reset is pressed twice
+# or the port is opened/closed at 1200 BAUD. If there is no program on the device,
+# you may have to manually enter bootloader by toggling reset twice.
+# see http://www.avdweb.nl/arduino/samd21/virus.html
+BOARD_TAG = arduino_zero_native
+
+# Define alternative core path if using another board supplier
+#ALTERNATE_CORE_PATH = $(HOME)/Arduino/hardware/sparkfun/samd
+
+# Define monitor port and isp port (bootloader port).
+# Will automatically detect if Linux/macOS but MUST be defined on Windows
+#MONITOR_PORT = com40 # CDC serial
+#ISP_PORT = com39 # bootloader
+
+# Define ARM toolchain dir if not using Arduino supplied
+#ARM_TOOLS_DIR = /usr
+
+# Define AVR toolchain dir if not using Arduino supplied and using native port
+#AVR_TOOLS_DIR = /usr
+
+# Define Arduino support package installation path where SAM device support has been installed
+# Linux
+#ARDUINO_PACKAGE_DIR := $(HOME)/.arduino15/packages
+# macOS
+#ARDUINO_PACKAGE_DIR := $(HOME)/Library/Arduino15/packages
+# Windows
+#ARDUINO_PACKAGE_DIR := "C:/Users/$(USER)/AppData/Local/Arduino15/packages"
+
+include ../../Sam.mk
diff --git a/examples/ZeroBlink/ZeroBlink.ino b/examples/ZeroBlink/ZeroBlink.ino
new file mode 100644
index 0000000..f9a59a9
--- /dev/null
+++ b/examples/ZeroBlink/ZeroBlink.ino
@@ -0,0 +1,19 @@
+/*
+ Blink
+ Turns on an LED on for one second, then off for one second, repeatedly.
+
+ This example code is in the public domain.
+ */
+
+void setup() {
+ // initialize the digital pin as an output.
+ // Pin 13 has an LED connected on most Arduino boards:
+ pinMode(13, OUTPUT);
+}
+
+void loop() {
+ digitalWrite(13, HIGH); // set the LED on
+ delay(1000); // wait for a second
+ digitalWrite(13, LOW); // set the LED off
+ delay(1000); // wait for a second
+}