Insight:
I've been totally supersized by the impact of the social media. We know that anyone can post or retweet pink news and some paparazzos like making groundless accusations through the network. Anyhow most of us enjoy the platforms. I wanna make a prototype toy can perform in the way of web celebrity did.
int PLAYPIN = 2;
void setup() {
pinMode(PLAYPIN,OUTPUT);
Serial.begin(9600);
digitalWrite(PLAYPIN,LOW);
}
void loop() {
int val; //
boolean START = 1;
val=analogRead(1); //connect grayscale sensor to Analog 1
Serial.println(val,DEC);//print the value to serial //
init(START); //
START = 0;
if(val >= 1000){
digitalWrite(PLAYPIN,HIGH);
delay(1000);
digitalWrite(PLAYPIN,LOW);
delay(100);
}
}
void init(boolean startSet){
digitalWrite(PLAYPIN,startSet);
delay(1000);
}
Step 3: 3D-print
Comments
Please log in or sign up to comment.