Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Pages: [1]   Go Down
Author Topic: yet another serial protocol  (Read 1127 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

designed to be human readable-writable
for example for doing something from your pc command line or any terminal or any program

example for blink led once: (send to com port with any method)
w13,1 d1000 w13,0 d1000 w13,1

w = write pin,value
d = delay

full commands list at http://code.google.com/p/avros/source/browse/trunk/avros.h

can be used as lib in any arduino sketch, or standalone with avros.pde

bonus: small unfinished perl lib for pc

hosted at http://code.google.com/p/avros/
svn checkout http://avros.googlecode.com/svn/trunk/ avros
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My thanks for this information.  I have installed the avros library and it works quite well.  I needed to add delimited text command streams to the code so chose to use '$' as a beginning command delimiter, so am able to process my commands in that fashion (trailing character is CR). 

However, I would like some additional information on using the monitor command(s) on a pin (or pins).  Using the flash memory for a command stream is also very interesting but I would need greater understanding of that very slick capability.  Any particular references I can find for these options?

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

to use prefix $ you can write main loop like:
    int cmd = read_chr(READ_TIMEOUT_FIRST);
    switch (cmd) {
        //case 'x': // your commands
        case '$': // lib commands starting from $: example:  $w13,1
         cmd_parse( read_chr() );
    }


best way to understand  monitor and EPROM command source - reading avros.h 8-)
EPROM now is linear source without conditions, but i think about GOTO-like commands.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the response.

I have successfully implemented my own '$' command for my text oriented command streams.  It works quite well.

I have read avros.h and absorbed all that it provides.  What I am missing is some of the conceptual basis for the EEPROM capability (how is it part of the Arduino firmware on the board), and the monitor function.  For example, is it possible to have multiple concurrent command streams running out of EEPROM?  What is the coding setup for for the monitor command (can there be multiple concurrent monitor commands running and can there be conditioned outputs from the monitor  command results?)

Do you know if there is availabe documentation for the internal Arduino firmware that can be exploited by a running sketch?
Logged

Pages: [1]   Go Up
Arduino Forum upgrade scheduled for Monday, October 20th, 11am-4pm (CEST). Sorry for the inconvenience!
Jump to: