commit 63ce4a17aff6afd0ad719494a701027a2963183a Author: Ian Burgmyer Date: Mon Sep 14 03:55:02 2020 -0400 Initial commit. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cad2541 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.sublime-workspace +bin/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..52823da --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2020 Ian Burgmyer + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1b92467 --- /dev/null +++ b/Makefile @@ -0,0 +1,45 @@ +# Arduboy project Makefile, by Spectere. +# +# Calling "make setup" will install the required components and libraries to +# your system. +# +# Requires: arduino-cli, GNU make (probably) + +PROJECT_NAME = hello + +ARDUINO-CLI = arduino-cli +AVRDUDE = avrdude + +BIN = bin +SRC = ${PROJECT_NAME} + +# credit: kenorb +# https://stackoverflow.com/questions/18136918/how-to-get-current-relative-directory-of-your-makefile +CWD := $(abspath $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))) + +all: compile + +setup: + # Platforms + ${ARDUINO-CLI} core install arduino:avr + + # Libraries + ${ARDUINO-CLI} lib install Arduboy + ${ARDUINO-CLI} lib install Arduboy2 + ${ARDUINO-CLI} lib install ArdBitmap + ${ARDUINO-CLI} lib install ArdVoice + ${ARDUINO-CLI} lib install ArduboyPlaytune + ${ARDUINO-CLI} lib install Arduboy-TinyFont + ${ARDUINO-CLI} lib install ArduboyTones + ${ARDUINO-CLI} lib install FixedPoints + + # Fin + ${ARDUINO-CLI} core update-index + +compile: + cd ${CWD} + ${ARDUINO-CLI} compile --fqbn arduino:avr:leonardo ${SRC} --output-dir ${CWD}/${BIN} + +upload: compile + cd ${CWD} + ${ARDUINO-CLI} upload --fqbn arduino:avr:leonardo --input-dir ${BIN} -p ${TARGET} ${PROJECT_NAME} diff --git a/Template.sublime-project b/Template.sublime-project new file mode 100644 index 0000000..24db303 --- /dev/null +++ b/Template.sublime-project @@ -0,0 +1,8 @@ +{ + "folders": + [ + { + "path": "." + } + ] +} diff --git a/hello/hello.ino b/hello/hello.ino new file mode 100644 index 0000000..db2917a --- /dev/null +++ b/hello/hello.ino @@ -0,0 +1,13 @@ +#include +Arduboy sys; + +uint32_t i = 0; + +void setup() { + sys.begin(); + sys.clear(); + sys.display(); +} + +void loop() { +}