Video appears in the painting is France painter, made by representatives of Impressionism and Claude Monet, founder.
Focus goes far beyond the image of the object of his light and color, making objects disappear in the light color on the canvas. He let the world realize that light and the nature of the structure. So the evolution of the vision, and even harder to imagine in the past, it gives off light, color, motion, and energy, replacing the dead in a previous painting composition and did not dare to have any tradition of innovation. Use Monet painting on light and color features, I thought why not painting his masterpiece, through Processing and Arduino interaction, combined with photoresistors, new perspective to appreciate the paintings by the master. Sowith this experimental project: photoresistors and Monet paintings of the interactive Processing.
Import processing.serial.*;//import serial communication library
Serial duankou;//to create the object duankou
Data float from the data;//variable to store the Arduino
Declare a variable of type PImage photo
Size (800,614);//canvas size definition
Pictures to variables is called photo
Set the communication port to COM3, the baud rate is 9600
duankou = new Serial(this,"COM3",9600);
Of bytes in variable data from Arduino
A byte range is 0~255.
Displayed in the console bytes from the Arduino
Photoresistors, sky light, the weaker digital 10-bit AD conversion, the greater
Filter tone function is smaller, the darker the picture, so to 255-data
Image (photo,0,0);//display pictures
Statement int sensorPin =0;//sensors attached to port0
Int data;//define variables for sending data to the Processing
Serial.begin (9600);//RS232 serial communication baud rate to 9600
Because digital of analog sensors in the range of 0~1023
Serial communication is sent in byte units, byte ranges of numbers for 0~255
Digital divide by 4 analogical sensors assigned data
Serial.print (data,BYTE);//define sends data to the Processing
Delay (100);//delay 100ms