summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTod E. Kurt <tod@todbot.com>2013-04-29 17:31:16 -0700
committerTod E. Kurt <tod@todbot.com>2013-04-29 17:31:16 -0700
commit0b979a07727c91d8395ad3fae64fa17c545077af (patch)
tree59f990288a0544d9d5554c3e0107c342c0bbfcb9
parent2dec0bb942d34a3c5eb373ae549785533ea23d29 (diff)
downloadarduino-serial-0b979a07727c91d8395ad3fae64fa17c545077af.tar.gz
arduino-serial-0b979a07727c91d8395ad3fae64fa17c545077af.tar.bz2
arduino-serial-0b979a07727c91d8395ad3fae64fa17c545077af.zip
minor fixes, put mac zipfile in repo, ugh
-rw-r--r--Makefile2
-rw-r--r--README.md35
-rw-r--r--arduino-serial-macosx.zipbin0 -> 3591 bytes
3 files changed, 23 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 1d211fb..1ef6ede 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,6 @@ UNAME := $(shell uname -s)
ifeq "$(UNAME)" "Darwin"
OS=macosx
- EXE_SUFFIX=
endif
ifeq "$(OS)" "Windows_NT"
OS=windows
@@ -20,6 +19,7 @@ EXE_SUFFIX=
ARCHS= -arch i386 -arch x86_64
CFLAGS+= $(ARCHS)
+CFLAGS += -mmacosx-version-min=10.6
CFLAGS_MONGOOSE= -I./mongoose -pthread -g
LIBS+= $(ARCHS)
diff --git a/README.md b/README.md
index 046a8fa..af16f19 100644
--- a/README.md
+++ b/README.md
@@ -4,26 +4,35 @@ arduino-serial -- C code to talk to Arduino
Original URL: http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/
-Usage is:
+Post about changes: http://todbot.com/blog/2013/04/29/arduino-serial-updated/
+
+Usage is:
<pre>
-% ./arduino-serial
-Usage: arduino-serial -p <serialport> [OPTIONS]
+laptop% ./arduino-serial
+Usage: arduino-serial -b <bps> -p <serialport> [OPTIONS]
Options:
- -h, --help Print this help message
- -p, --port=serialport Serial port Arduino is on
- -b, --baud=baudrate Baudrate (bps) of Arduino (default 9600)
- -s, --send=string Send string to Arduino
- -S, --sendline=string Send string with newline to Arduino
- -r, --receive Receive string from Arduino & print it out
- -n --num=num Send a number as a single byte
- -F --flush Flush serial port buffers for fresh reading
- -d --delay=millis Delay for specified milliseconds
- -q --quiet Don't print out as much info
+ -h, --help Print this help message
+ -b, --baud=baudrate Baudrate (bps) of Arduino (default 9600)
+ -p, --port=serialport Serial port Arduino is connected to
+ -s, --send=string Send string to Arduino
+ -S, --sendline=string Send string with newline to Arduino
+ -r, --receive Receive string from Arduino & print it out
+ -n --num=num Send a number as a single byte
+ -F --flush Flush serial port buffers for fresh reading
+ -d --delay=millis Delay for specified milliseconds
+ -e --eolchar=char Specify EOL char for reads (default '\n')
+ -t --timeout=millis Timeout for reads in millisecs (default 5000)
+ -q --quiet Don't print out as much info
Note: Order is important. Set '-b' baudrate before opening port'-p'.
Used to make series of actions: '-d 2000 -s hello -d 100 -r'
means 'wait 2secs, send 'hello', wait 100msec, get reply'
+d
</pre>
+
+arduino-serial should compile on any POSIX-compatible system.
+Tested on Mac OS X, Ubuntu Linux, Raspian Linux, Beaglebone Linux
+
diff --git a/arduino-serial-macosx.zip b/arduino-serial-macosx.zip
new file mode 100644
index 0000000..a35f8a5
--- /dev/null
+++ b/arduino-serial-macosx.zip
Binary files differ