X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Scan%2FISSILed%2FexampleAPI.bash;h=7993c38cea2462094e3291fb7360e6c596df5360;hb=42084aa9609a6b351b78c8759dc9f6aaf4e0d384;hp=5d66c3717c742c5c8c899fbd0e8e449d46d36ebe;hpb=df7d0be00d11dead100a688f37b6465612dd7f0c;p=kiibohd-controller.git diff --git a/Scan/ISSILed/exampleAPI.bash b/Scan/ISSILed/exampleAPI.bash index 5d66c37..7993c38 100755 --- a/Scan/ISSILed/exampleAPI.bash +++ b/Scan/ISSILed/exampleAPI.bash @@ -1,11 +1,17 @@ -#!/bin/bash +#!/usr/bin/env bash # ISSILed # Virtual Serial Port API Example # Jacob Alexander 2015 +if [ $# -eq 0 ]; then + echo "You must specify your virtual serialport. (/dev/ttyACM0 on linux, /dev/cu.usbmodemXXXX on OSX)" + echo " ex: $0 /dev/ttyACM0" + exit 1 +fi # XXX Set this to match your virtual serialport -# TODO Show examples for Mac OSX and Cygwin/Windows -SERIALPORT=/dev/ttyACM0 +# TODO Show examples for Cygwin/Windows +# For Mac OSX it will be something like /dev/cu.usbmodem1413 (number may differ) +SERIALPORT=$1 # NOTE: Make sure you don't write too quickly to the serial port, it can get overwhelmed by a modern computer # Generally this just means commands will get ignored