» arduino02
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

arduino02

French

01 "hello world" aka send something from arduino to VVVV

First go to www.arduino.cc and download the latest version of the IDE and the USB drivers (only if you have a USB board) and maybe it's useful to read this.

Okay, now connect an LED to the board (LED: longer wire in pin 13 and shorter wire in GND). normally you always have to use a resistor if you want to connect LEDs to the board ... but pin 13 has one already (it's kind of "debug pin" with the use of a led)

Upload this code to the board (press the reset button on the board and the upload button in arduino IDE "Upload to I/O Board"). after 5 seconds the led should start to blink, which means our program is running :)

/* say hello "world" to vvvv and blinking LED
 * ------------
 *
 * sends an string via serial port to vvvv
 * the classic hello word example
 * plus lets a led on digital pin 13 blinkin
 *
 * 17-01-2006
 * copyleft 2006 benedikt gross
 *
 * Updated 20-8-09 by West
 */
 
int ledPin = 13; // LED connected to digital pin 13
 
void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
Serial.begin(9600); // initializes serial port
}
 
void loop()
{
Serial.print ("hello VVVV"); // sends a string via the serial port
//linebreak
Serial.write(10); // sends '\n' = ASCII 10
Serial.write(13); // sends '\r' = ASCII 13
 
digitalWrite(ledPin, HIGH); // sets the LED on
delay(100); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(100); // waits for a second
}

Since arduino uses serial commands to upload the code, and talk to the computer, only ONE program at the time is allowed to talk (and/or listen) to the arduino. So if you see the blinking LED, it means the code is uploaded. Now close the arduino IDE software BEFORE you start the vvvv-patch. If the LED doesn't blink, try again (including resetting), check for errors in the compiler, or reverse the LED.

Connect the rs232 node to the correct com port. Now you should get the string "hello VVVV".
SUPER! We see that everything is working and can go further to part 2.

back to toc

anonymous user login

Shoutbox

~3h ago

graphicuserinterface: @zepi:skynet is becoming self aware

~20h ago

flateric: Thanks devvvvs, I owe you a few bananas next time we meet :)

~2d ago

kiilo: @rexmtl im going to foulab later ...

~2d ago

kiilo: @wxmtl YES im in Montreal please contact me in the IRC chat or skype

~2d ago

rexmtl: I need help learning VVVV. Anyone in Montreal willing to help> I'm desperate

~2d ago

mrboni: Ah haahh. So many contributions, so little time.. Thanks guys!