Arduino Diecimila Board Access

This is a very simple starter DEMO to access Arduino Diecimila Board for the
Macbook Pro 13" OSX 10.7.5...
A potentiometer is connected between 5V and Gnd with the wiper connected to
ANALOG IN 0 on the Arduino. This was adjusted to give the Ms and Ls as seen...

I now have DC in for this machine AND Linux too as on my Linux tools the device
becomes /dev/ttyUSB0 <WINK, (DC into the AudioScope here we come. ;o)>...

NOTE:- The device below is for MY machine and WILL be different for yours...

It is assumed that you have a Terminal up and running AND you have NOT
plugged in your USB Arduino Board yet...

Enjoy finding simple solutions to often very difficult problems...

Public Domain and you may do with it as you please...

Last login: Thu Jul 18 21:58:14 on ttys000
AMIGA:barrywalker~> # Find the USB device first.
AMIGA:barrywalker~> ls /dev/*usb*
ls: /dev/*usb*: No such file or directory
AMIGA:barrywalker~> # Now plug in the Arduino Diecimila Board...
AMIGA:barrywalker~> ls /dev/*usb*
/dev/cu.usbserial-A7007cvs	/dev/tty.usbserial-A7007cvs
AMIGA:barrywalker~> # USE the /dev/cu.usbserial-A7007cvs device...
AMIGA:barrywalker~> cat < /dev/cu.usbserial-A7007cvs
MLMMLMMMMMMLMMMMLMLMMLLLLLLMLLMMMMMLMMMLMLLMLMLMMMMMMMMMMMLLMLLLMLLLLLLMLLLMLLM
MMMLMLLMLMMMLMMMMMLMLMLMLMMMLLLMMLLMMMMMMLLLMLLMMLMLLLLLMMMMLMLLLLMMMMMMMLLLMML
MMLMMMLLMLMLMLLMMMMLLLMLMMMMMLLMMLMMMLLMMMLLMMMMMMMMMMLLMLLLMMLLLMLMLMMLMMLMLML
MMMMMLLMMMMLLLLLLMMMMMMLLMLMMMMMLMMMLLMLMLMLLMLMLLLLMMMLMMLMMMMLMLMLMMLMMLMLMML
MLMLLLMLLLLLLMLLMMLMMMLMMMLMMLMLMMLMLMLMMLMLMMMLLLMLMLLLMMLLLMLMLMLLLLLLLMLMMML
LMcMMLLLLMLMMMMLMMMMMLMMLLMLMMMMMMLMLLMMMMMLMMMMLMLLMLMMMLLLMMMMMLLLMLMMLMLMMLM
MLMLLMLMMMMMLLLMMMMLLLMLMMLLMMLLMLLLMMMLLMMMLLMLLLLMMLLMMMMLLMMMMMLLLLLMMLLMMML
MLMMLLLMLLLLM^C
AMIGA:barrywalker~> _

The .PDE file for the Arduino as a test piece, this uses an early version of the
programming SW and I know it won't compile on current versions so you will have
to modify slightly as required...

/* Using the Arduino as a DEMO single channel ADC for Windows (TM), Linux, */
/* AMIGA, WinUAE and now the Macbook Pro 13 inch OSX 10.7.5... */

/* Set up a variable for basic analogue input. */
int analogue0 = 0;

void setup() {
  /* Open the serial port at 9600 bps. */
  Serial.begin(9600);

  /* Set the analogue voltage reference, DEFAULT is 5V in this case. */
  analogReference(DEFAULT);
}

void loop() {
  /* Read the 10 bit analogue voltage on analogue input 0. */
  analogue0 = analogRead(0);
  /* Convert to a byte value by dividing by 4. */
  analogue0 = analogue0/4;

  /* Send to the Serial Port the byte value. */
  Serial.print(analogue0, BYTE);
}