summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Tittelbach <bernhard@tittelbach.org>2016-06-12 05:06:11 +0200
committerBernhard Tittelbach <bernhard@tittelbach.org>2016-06-12 06:36:54 +0200
commitc35b4171d0cd2b370262ae2bb772f627b1f6d7b9 (patch)
tree5c7cf01c594791c5321d7bb3c4f7de1d6b9816c4
parentRevert "bmp180 pressure sensor, just lacks arduino i2c-wire-lib and testing" (diff)
ArduinoProMicro
-rw-r--r--defines.mk12
-rwxr-xr-xtools/detect_newest_acm4
-rwxr-xr-xtools/reset_sparkfun40
3 files changed, 56 insertions, 0 deletions
diff --git a/defines.mk b/defines.mk
index 3fe303c..fd57edd 100644
--- a/defines.mk
+++ b/defines.mk
@@ -135,6 +135,18 @@ ifeq ($(BOARD_TYPE),rhmixxx)
PROG := DFU
LUFA_BOARD = NONE
endif
+ifeq ($(BOARD_TYPE),arduinoProMicro)
+ MCU := atmega32u4
+ ARCH = AVR8
+ F_CPU := 16000000
+ F_USB = $(F_CPU)
+ PROG := avrdude
+ UPLOAD_RATE := 57600
+ PROG_TYPE := avr109
+ AVRDUDE_PORT := /dev/ttyACM0
+ LUFA_BOARD = TEENSY2
+ ARDUINO_PINS = leonardo
+endif
ifeq ($(BOARD_TYPE),arduinoUno)
MCU := atmega328p
ARCH = AVR8
diff --git a/tools/detect_newest_acm b/tools/detect_newest_acm
new file mode 100755
index 0000000..a9d850f
--- /dev/null
+++ b/tools/detect_newest_acm
@@ -0,0 +1,4 @@
+#!/bin/zsh
+#(c) Bernhard Tittelbach
+print /dev/ttyACM*(NOc[-1])
+
diff --git a/tools/reset_sparkfun b/tools/reset_sparkfun
new file mode 100755
index 0000000..fd3cd05
--- /dev/null
+++ b/tools/reset_sparkfun
@@ -0,0 +1,40 @@
+#!/bin/sh
+#(c) Bernhard Tittelbach
+
+if [ -z "$1" ]; then
+ IDS="03eb:204b"
+else
+ IDS=$1
+fi
+
+WAIT_MAX=20
+
+FOUND=0
+DISAPPEARED=0
+echo -n "Please double-tap GND to the RST pin"
+i=$WAIT_MAX
+while (test $i -gt 0); do
+ echo -n "."
+ for id in $IDS; do
+ lsusb -d $id > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ FOUND=1
+ [[ $DISAPPEARED -eq 1 ]] && break;
+ else
+ [[ $FOUND -eq 1 ]] && DISAPPEARED=1;
+ fi
+ done
+ if [ $FOUND -eq 1 -a $DISAPPEARED -eq 1 ]; then
+ break;
+ fi
+ sleep 1
+ i=$(($i-1))
+done
+
+if [ $FOUND -eq 1 ]; then
+ echo " device found!"
+else
+ echo " timout - trying anyway"
+fi
+
+exit 0