yet another serial protocol, for people

    Almost every arduino owner is faced with the task of controlling its pins by a signal from a computer, and almost everyone writes his own program in which reading Serial, and switch with actions.
    Once, I was tired of compiling something for every sneeze, and I got another small, simple, human-and script-oriented protocol.


    Download: svn checkout http://avros.googlecode.com/svn/trunk/ avros
    compile and fill avros.pde

    Open the com port in any way and write there:
    w13,1
    and we have digitalWrite (13,1), or
    W10 , 100 analogWrite (10,100)
    r10 digitalRead (10) - the result will return as r10,1
    R14 analogRead (14) - R14,42
    d100 delay (100)
    and almost all other functions, more details inside avros.h
    in the numbering of pins are analog immediately after digital, 14-21 on small and 54-69 on mega.

    You can use any convenient separator between commands, for example:
    w13,1 d500w13,0 ;-) d100; w13,1

    can record the sequence in eprom, and carry it out in a loop or one-time fee:
    E o w13,1 D1000 D1000 w13,0 the OSE es

    decorated in a single .h file that you can attach to any program, example: avros.pde

    Leaking bun: you can send commands directly from the command line of any os directly to the port, without forgetting to set the speed, you can connect via erminal type putty or minicom, or from any scripts in any language (for example one esoteric language included)

    Yes, about Firmata with a binary protocol and the Bitlash monster, which will take up all the memory on a 168 chip, I know.

    Ready to dig in the missing functions, you can from standard libraries.

    Also popular now: