Project in progress
Piano Tiles automatic Robot

Piano Tiles automatic Robot © GPL3+

Kid and his father make Piano Tiles automatic Robot.

  • 2 views
  • 0 comments
  • 0 respects

Components and supplies

Apps and online services

About this project

Kid and his father make Piano Tiles Automatic Robots

In Korea, Learning coding is trendy. Ministry of Education promotes S/W industry and they supports S/W coding tool for kids, called Entry.

10 years old Kid and His father started to make Piano Tiles Robot. Father made H/W Arms and Kid programmed the code.

Looks a little bit shaky. Meanwhile, because they are together, so the making was quite good time for them and could get achivement.

Code

Piano tiles codeArduino
#include <Servo.h>
Servo myservo_0;
Servo myservo_1;
Servo myservo_2;
Servo myservo_3;

void setup() {

myservo_0.attach (11);  
myservo_1.attach (10);  
myservo_2.attach (9);  
myservo_3.attach (3);  

pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
pinMode(A3, INPUT);
Serial.begin(9600);
}

void loop() {

int light_0 = analogRead(A0);
Serial.println(light_0);  
int light_1 = analogRead(A1);
Serial.println(light_1);
int light_2 = analogRead(A2);
Serial.println(light_2);
int light_3 = analogRead(A3);
Serial.println(light_3);        

 

if(light_0 > 400)
 {
      
for (int angle_0=0; angle_0<180; angle_0+=3)  
     {
      myservo_0.write(angle_0);  
      delay(5); 
     }
  }
else  
{
  int angle_0=0;
  myservo_0.write(angle_0);  
  delay(5);  
 }

 

if(light_1 > 400) 
 {
      
for (int angle_1=0; angle_1<180; angle_1+=3) 
     {
      myservo_1.write(angle_1); 
      delay(5);  
     }
  }
else  
{
  int angle_1=0;
  myservo_1.write(angle_1); 
  delay(5); 
 }

 

if(light_2 > 400)
 {
      
for (int angle_2=0; angle_2<180; angle_2+=4)
     {
      myservo_2.write(angle_2);
      delay(5); 
     }
  }
else 
{
  int angle_2=0;
  myservo_2.write(angle_2);  
  delay(5);  
 }

 


 if(light_3 > 400)
 {
      
for (int angle_3=0; angle_3<180; angle_3+=3) 
     {
      myservo_3.write(angle_3);
      delay(5); 
     }
  }
else 
{
  int angle_3=0;
  myservo_3.write(angle_3);  
  delay(1); 
 }  

}

Schematics

schmetics_arduino_pianotiles_200414
Arduino pianotiles 200414 ignnp1ml6r

Comments

Similar projects you might like

Scriba Robot - A Printing Robot

Project in progress by RobinB

  • 3,162 views
  • 0 comments
  • 10 respects

Amazing 6WD Off-Road Robot | Arduino RC Robot

Project tutorial by Jithin Sanal

  • 11,827 views
  • 1 comment
  • 62 respects

MeArm Robot Arm - Your Robot - V1.0

Project tutorial by Benjamin Gray

  • 31,561 views
  • 4 comments
  • 45 respects

Unravel Preset Piano Easy Arduino (Even a Ghoul Can Make It)

Project in progress by ExeCuteLi

  • 16,921 views
  • 13 comments
  • 34 respects

Architectural Model of a Bus Stop with Automatic Sunshade

Project showcase by addicttux

  • 5,778 views
  • 25 comments
  • 40 respects
Add projectSign up / Login