the arduino shell


This is the home of arsh, the arduino shell. It aims to provide a basic interactive environment to explore an arduino (or similar) board.

It is available under the terms of the GNU General Public License.


arsh-0.1.tar.gz released 2009-02-17

Installing arsh

The provided makefile can compile arsh, and upload it to your arduino as well.

Type make to compile arsh. You will need an AVR development environment installed, including AVR versions of gcc, libc and binutils. On debian-based systems, installing the packages gcc-avr, avr-libc and binutils-avr should be enough.

To upload the compiled firmware to your arduino, type make upload. You will need to have avrdude installed on your system for this. Before you upload the firmware, check the start of the makefile and adjust the variables there as needed. As always, you will need to reset the arduino just before uploading the firmware.

The distribution comes with a compiled version (arsh.hex). This works on an arduino duemilanove with ATMEGA168 microcontroller.

Using arsh

By default, arsh listens on the arduino's builtin serial port at 38400 bps. Connect to it with a serial terminal emulator, for example:
screen /dev/ttyUSB0 38400
and hit enter to see the command prompt. Type 'help' at the prompt to see a brief help message:
] help
ping                                return 'pong'
read dpin <pin>                     return digital state of pin
read apin <pin>                     return analog state of pin
set dpin <pin> <state>              set pin to state ('HIGH' or 'LOW')
set mode <pin> <mode>               set pin to mode ('IN' or 'OUT')
monitor [dpin|apin <pin> ...]       live pin monitor
Some examples:
read dpin 2 returns the state of digital pin 2
set mode 3 out set digital pin 3 to output mode
set dpin 5 low set digital pin 5 to low
monitor monitor all digital and analog pins
monitor dpin 2 3 apin 0 1 2 monitor only the given pins

Plans for the future


arsh was written by Bert Vermeulen. Feedback, patches and free electronic gear welcome!