aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/flash-tiny1634-fuses.sh9
-rwxr-xr-xbin/flash-tiny1634.sh3
-rwxr-xr-xbin/level_calc.py10
3 files changed, 22 insertions, 0 deletions
diff --git a/bin/flash-tiny1634-fuses.sh b/bin/flash-tiny1634-fuses.sh
new file mode 100755
index 0000000..1bc73e1
--- /dev/null
+++ b/bin/flash-tiny1634-fuses.sh
@@ -0,0 +1,9 @@
+#/bin/sh
+# 8 MHz, 64ms boot delay, enable flashing
+# (everything else disabled)
+# Use low fuse 0xD2 for 4ms startup delay,
+# or 0xE2 for 64ms (useful on a twisty light)
+# Use high fuse 0xDE for BOD 1.8V,
+# or 0xDF for no BOD
+avrdude -c usbasp -p t1634 -u -U lfuse:w:0xe2:m -U hfuse:w:0xde:m -U efuse:w:0xff:m
+
diff --git a/bin/flash-tiny1634.sh b/bin/flash-tiny1634.sh
new file mode 100755
index 0000000..2eb9b77
--- /dev/null
+++ b/bin/flash-tiny1634.sh
@@ -0,0 +1,3 @@
+#/bin/sh
+FIRMWARE=$1
+avrdude -c usbasp -p t1634 -u -Uflash:w:$FIRMWARE
diff --git a/bin/level_calc.py b/bin/level_calc.py
index f16f8ce..f1e7d16 100755
--- a/bin/level_calc.py
+++ b/bin/level_calc.py
@@ -152,6 +152,16 @@ def multi_pwm(answers, channels):
(cnum+1,
','.join([str(int(round(i))) for i in channel.modes])))
+ # Show highest level for each channel before next channel starts
+ for cnum, channel in enumerate(channels[:-1]):
+ prev = 0
+ i = 1
+ while (i < answers.num_levels) \
+ and (channel.modes[i] >= channel.modes[i-1]) \
+ and (channels[cnum+1].modes[i] == 0):
+ i += 1
+ print('Ch%i max: %i (%.2f/255)' % (cnum, i, channel.modes[i-1]))
+
def get_value(text, default, args):
"""Get input from the user, or from the command line args."""