comparison Scan/STLcd/exampleAPI.bash @ 402:88814d3c0c8b

Merge remote-tracking branch 'github/master' into not-linux
author Dan McGregor <dan.mcgregor@usask.ca>
date Tue, 05 Jan 2016 10:08:14 -0600
parents 99f93dec8fea 63b1d003fd50
children
comparison
equal deleted inserted replaced
401:99f93dec8fea 402:88814d3c0c8b
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 # STLcd 2 # STLcd
3 # Virtual Serial Port API Example 3 # Virtual Serial Port API Example
4 # Jacob Alexander 2015 4 # Jacob Alexander 2015
5 5
6 if [ $# -eq 0 ]; then
7 echo "You must specify your virtual serialport. (/dev/ttyACM0 on linux, /dev/cu.usbmodemXXXX on OSX)"
8 echo " ex: $0 /dev/ttyACM0"
9 exit 1
10 fi
6 # XXX Set this to match your virtual serialport 11 # XXX Set this to match your virtual serialport
7 # TODO Show examples for Mac OSX and Cygwin/Windows 12 # TODO Show example for Cygwin/Windows
8 SERIALPORT=/dev/ttyACM0 13 # For Mac OSX it will be something like /dev/cu.usbmodem1413 (number may differ)
14 SERIALPORT=$1
9 15
10 # NOTE: Make sure you don't write too quickly to the serial port, it can get overwhelmed by a modern computer 16 # NOTE: Make sure you don't write too quickly to the serial port, it can get overwhelmed by a modern computer
11 # Generally this just means commands will get ignored 17 # Generally this just means commands will get ignored
12 # I'm using 100 ms sleeps here, but much smaller are probably sufficient 18 # I'm using 100 ms sleeps here, but much smaller are probably sufficient
13 19