This is a discussion on Arduino/SimpleMessageSystem w/shell scripts - Embedded ; I have succeeded in my project to use the above hardware from the shell. The hard part is installing SMS on the Arduino. You'll need a system with Java5 or the GUI will be a mess. You'll also need to ...
I have succeeded in my project to use the above hardware from the shell.
The hard part is installing SMS on the Arduino. You'll need a system with
Java5 or the GUI will be a mess. You'll also need to 'sudo apt-get install
gcc-avr avrdude'. These are the cross-compiler and the loader. The GUI for
linux is Arduino-0010, recently released for linux. Or maybe you can get
someone to load the hardware for you. Google will find SMS &etc.
About my shell scripts: Run this now: 'wget http://22.214.171.124/SMS1.tgz'
It only works when my system is booted, so keep trying.
rolandl@desktop1:~/bin$ ls;echo;cat readme.txt
convert ledOff-1 readAD-1 readme.txt wait4pin-1
gpl.txt ledOn-1 readIO-1 setup-Arduino writePin-1
# by Roland Latour, Feb.2008, GPLv3, see gpl.txt, included
# email: firstname.lastname@example.org
For Arduino Diecimila with USB, loaded with Simple Message System
Don't forget to change the baud rate from 9600 to 115200 before
you click on compile-and-load.
Many of these files may look strange, because they contain embedded ^M
characters. I used vi to create them. I suggest you put them in $HOME/bin
and make sure that's in your $PATH.
First, 'source setup-Arduino'. This sets port parameters then starts a
helper process to catch output from the Unit (from read commands)
and stuff it into logfile1.raw. Run 'jobs' to see it.
Write commands are easy, they shouldn't need a helper process. But it seems
they only get reliable when the helper is running. I don't know why.
Read commands are very similar to write commands, but they use the command
'tail -1 logfile1.raw'
to get their data. The 'sleep 1' is necessary because the helper is slow.
I found it useful to run 'tail -f logfile1.raw' in another window
during read commands, especially for timing purposes.
When you unplug the unit, its device node goes away, which kills the
Finally got the right data format from readAD-1: Comma-separated values
with timestamp, in logfile.csv: 13:38:56,1016,3279,3191,4999,3895,0
It shows values scaled to MilliVolts: ch1=3.3v, ch3=5v, ch5=gnd, others float.
This imports to OpenOffice calc easily, for further analysis or graphing.
Commands ending with -1 are to operate/test UNIT1. Setup-Arduino can be
fixed up for expansion. Need more pins? Plug in another SMS-loaded unit!
1)finish the wait4pin command
2)I think linux needs a repeat command
3)create PWM program: syntax: 'writePWM-1 pin# 0-255'
where pin#=3,5,6,9,10,11 and 0-255 gives 0-100% duty cycle
The official website http://www.arduino.cc/en/Reference/AnalogWrite says:
The frequency of the PWM signal is approximately 490 Hz.