#!/usr/bin/env sh
BV=/dev/ttyACM1

#echo "reset" > $BV
#sleep 3

echo "quit" > $BV
sleep 0.5
echo "" > $BV
sleep 0.1

for cmd in "mode 1-wire" "" "" "LV 3.3" "power on" "search" "a [ 0xcc 0xbe r:9 ]"; do
  echo $cmd > $BV
  sleep 0.1
done

exit 0

for i in `seq 1 100`; do
  echo "scan" > $BV
  sleep 1
done
