LikeYouPartyPin by WillemvD 3d model
3dmdb logo
Thingiverse
LikeYouPartyPin by WillemvD

LikeYouPartyPin by WillemvD

by Thingiverse
Last crawled date: 3 years ago
Let him/her know your feeling by pushing the button. A 9volt block cell is attached with longer wires, so you can put the battery in some pocket. Resistors are 330 Ohms.
A short sketch makes him smile and wink.https://youtu.be/ZKaazJybcu4
int Eye = 0; int MouthLow = 2; int MouthHigh = 1; int Switch = A3; int val=0;
void setup() {
pinMode(Eye, OUTPUT); pinMode(MouthLow, OUTPUT);
pinMode(MouthHigh, OUTPUT); pinMode(Switch, INPUT);}
void loop() {
digitalWrite(Eye, HIGH);digitalWrite(MouthLow, LOW);digitalWrite(MouthHigh, LOW);
val=analogRead(Switch);
if (val<200){
for (int x;x<3;x++){
digitalWrite(MouthLow, HIGH); delay(500);
digitalWrite(MouthHigh, HIGH); delay(1000);
digitalWrite(Eye, LOW); delay(200);digitalWrite(Eye, HIGH);delay(200);
digitalWrite(Eye, LOW); delay(200);digitalWrite(Eye, HIGH);delay(200);
digitalWrite(MouthLow, LOW); digitalWrite(MouthHigh, LOW); delay(500); }}}

Tags