For this assignment I used some random pieces of household plastics (coffee cup and fruit container) to construct what was conceived as a 'disco ball' like effect. Using arcylic paint to black out the LED the light only shines through the holes, and those spots with less paint cover.
Resource list
Arduino
Breadboard
DC motor
Potentiometer
LED
Arduino code
x/*
* one pot fades one motor
* modified version of AnalogInput
* by DojoDave <http://www.0j0.org>
* http://www.arduino.cc/en/Tutorial/AnalogInput
* Modified again by dave
*/
int potPin = 0; // select the input pin for the potentiometer
int motorPin = 9; // select the pin for the Motor
int val = 0; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600);
}
void loop() {
val = analogRead(potPin); // read the value from the sensor, between 0 - 1024
Serial.println(val);
analogWrite(motorPin, val/4); // analogWrite can be between 0-255
}