Git Product home page Git Product logo

limkokholefork / arduino-serial Goto Github PK

View Code? Open in Web Editor NEW

This project forked from todbot/arduino-serial

0.0 1.0 0.0 448 KB

Example C and Java host code to talking to an arduino or other "serial" device

Home Page: http://todbot.com/blog/

License: MIT License

Java 1.64% Shell 0.28% Makefile 2.52% C 74.95% C# 3.11% Python 3.02% HTML 1.50% JavaScript 1.12% CSS 0.71% Groff 2.61% Perl 8.54%

arduino-serial's Introduction

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/

Post about changes: http://todbot.com/blog/2013/04/29/arduino-serial-updated/

Usage

laptop%  ./arduino-serial
Usage: arduino-serial -b  -p  [OPTIONS]

Options:
  -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'

Downloads

For convenience, here's some pre-built versions of arduino-serial. They may not be updated regularly, so compile it yourself if you can. Click the "view raw" to get the actual zip file.

Compilation

arduino-serial should compile on any POSIX-compatible system. Tested on Mac OS X, Ubuntu Linux, Raspian Linux, Beaglebone Linux

To build, just check it out, make, and run it like:

% git clone https://github.com/todbot/arduino-serial.git
% cd arduino-serial
% make
% ./arduino-serial

For more details on the build process, see the Makefile.

arduino-serial's People

Contributors

todbot avatar drew-gross avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.