Phidgets and externals

Mike Bonner bonnmike at gmail.com
Wed Jul 11 17:23:30 EDT 2012


Well first step is see if you can load a program into it using the arduino
dev stuff.  (I assume the rev 3 uses usb as a serial port yes)  Well if you
can shove a program into it then you're connected!  Might look at the blink
program as it can use the on board led so no wiring necessary for the first
test.

There are a few communications programs you can try also to see if you can
send and receive over serial.  (using the serial monitor that is part of
the arduino software)

I can only speak about the windows side of things, but its pretty easy.

To do a very simple little bit of nothing serial check you can do something
like the following.

char command = '\0';  //define var command and init it to null

void setup() {
Serial.begin(115200); // use whatever rate you want
}

void loop() {

if (Serial.available() > 0)
{
command = Serial.read();
}

switch (command)
{
case '\0':
// do nothing if no command sent
break;

default:
Serial.print('You typed char');
Serial.println(command);
command = '\0';
break;
}


Load it into your arduino, start the serial monitor and start sending
chars. Or full strings, if you send a string it will put one char on each
line with the message "you typed char whateverchar"

To use LC for this you'll need to a) open the file for update (on windows
it will be COM3: for com 3 etc) on mac it would be open device and the
device name, though again, I believe on mac people have had to resort to
applescript to do the actual connection to the port.

make sure you look at serialcontrolstring and use it to match settings to
your arduino (I've only needed to set the baud rate to match, the other
settings have worked fine as default)

Should be easy to setup a stack that mimics the arduino devs built in
serial monitor.  a couple fields, a way to connect and disconnect, type in
1 field and send, put received data in field 2.  (I can send you a simple
stack that does just exactly this if you want)


On Wed, Jul 11, 2012 at 2:52 PM, Magicgate Software - Skip Kimpel <
skip at magicgate.com> wrote:

> Just picked up a Uno rev3... got any quick, simple tests I can run on
> it to confirm level of connectivity?
>
> SKIP
>
> On Wed, Jul 11, 2012 at 12:29 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> > I haven't nor have I used the mega or the single stick boards. Just the
> uno
> > rev 2.
> >
> > Don't know what others are using of course.
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list