Interfacing the Wiring hardware and VVVV

This tutorial introduces the basic interfacing between the Wiring hardware and VVVV The brief for the tutorial will be to read simple values from the Wiring board. It assumes the Wiring software and VVVV are installed and the proper Wiring setup has been previously completed. For more Information on Wiring install check out the tutorials about Wiring installation and software setup.

Step 1

Copy and paste the following code on the Wiring editor: Verify your program is free of compiling errors by pressing the Compile/Verify button in the menu bar. Press the Upload button in the menu bar. In case of syntax errors the Wiring environment will print the error messages otherwise it will print the Upload was completed successfully, the uploading process triggers activity in the Rx/Tx LEDs on the Wiring hardware. The new program will start automatically after uploading. Use the Serial Monitor button to watch the data coming from the Wiring board, then close the Serial Monitor again.

 * Photoresistor / VVVV

 * Reads values from a photoresistor connected to the 
 * analog input pin 0. The value read from the sensor is proportional
 * to the amount of light that hits the sensor surface.
 * The value read is printed through the serial to be monitored
 * in the console or received on VVVV.
 * Adicionally, the program sends a character ' ' as a byte to devided the values
 * when are received by VVVV.

int val; 

void setup()
  Serial.begin(9600);      // sets the serial port to 9600

void loop() 
  val = analogRead(0);     // read analog input pin 0
  Serial.println(val/4, DEC);  // prints the value read from the
                               // sensor in analog pin 0 divided by 4 (range 0-255)
  Serial.write(32);			//ascii=' ' (blank space)
  delay(200);                  // wait 200ms for next reading


Step 2

Next step is to setup things in VVVV. Start VVVV.


Step 3

Connect the objects as shown:

Note: The next image shows the parameters which must be modified in each object.


Next >> Sending data to the Wiring board from VVVV