Guitarra eléctrica – Itinerario de aprendizaje proyecto 12

Nuestro Itinerario de aprendizaje maker esta desarrollado para aprender todos los fundamentos y un poco más acerca de electrónica y programación.

Si completas el itinerario serás capaz de crear casi cualquier proyecto que imagines. En cada proyecto se introducen nuevos conceptos, de modo que aprenderás haciendo o creando de una manera amena y divertida.

Construiremos una guitarra con al que podrás tocar varias notas y crear nuevas melodias.

Project Description
Project 12
IR ELECTRIC GUITAR GAME

Learn how to use Line Follower IR Sensor and other funny applications for it!

Before Start
BEFORE TO START

DIFFICULTY LEVEL: Intermediate
DURATION OF THE ACTIVITY: 45 min.

MATERIALS:
4in1 board
Buzzer
Battery holder & wires
Battery holder & wires
Battery holder & wires

1 - Buzzer module
Battery holder, USB cable and wires.

Components
12 - Line Follower IR Sensor

The Line Follower IR Sensor from ebotics is capable of following a black line on a white surface autonomously and with no external control. It is made up of an infrared LED and a phototransistor placed next to each other.

The LED acts as a transmitter, and the phototransistor acts as a receiver. The infrared LED emits infrared light, that is, light that has a longer wavelength (or lower frequency) and is invisible to the human eye. If this light hits a white surface, it will be reflected and bounce off onto the phototransistor. On the other hand, if it hits a black surface, the material will absorb the majority of the light, and it will not reach the phototransistor.

Line follower contest

It is a common category in robot competitions. The fastest autonomous robot that completes the circuit wins!

Exercise 12 - Circuit
12 - Circuit

To be able to use the line follower sensor, we have to use only one digital input for each one. The own board has electronics to distinguish between black and white, and we will receive high or low state accordingly.

Connect wires from 4in1 board to components:
- DIO6 to Buzzer module
- DIO2 to line follower 1
- DIO3 to line follower 2
- DIO4 to line follower 3

Exercise 12.1 - Program
12.1 Black and white reading

Our line follower sensor send a high state when dark color is on front of it. Let's see using onboard led (PIN 13)

Block Coding
Arduino Coding
void setup() {
  pinMode(2,INPUT);
  pinMode(13,OUTPUT);
}
void loop() {
   if(digitalRead(2)){
          digitalWrite(13,1);
   }else{
          digitalWrite(13,0);
   }
}
Exercise 12.2 - Follower Maker Robot
12.2 - Follower Maker Robot

Use the robot build in previous project, and make it follow your line circuit. You need to build a circuit to test it. Try it yourself! Find some inspiration in our line follower activities:

See
what is capable to do your follower!
Final project - Electronic guitar
Final project - Electric guitar game

Have some fun playing your guitar in a different way!! Find the way to add more thn 3 different tones combining different inputs and play! Download our cardboard template

Block coding
Arduino code
int Buzzer = 6;
int IR1 = 2, IR2 = 3, IR3 = 4;
boolean IR1Value, IR2Value, IR3Value;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600); 
  pinMode(Buzzer, OUTPUT);
  pinMode(IR1, INPUT);
  pinMode(IR2, INPUT);
  pinMode(IR3, INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  IR1Value = digitalRead(IR1);
  IR2Value = digitalRead(IR2);
  IR3Value = digitalRead(IR3);
  Serial.print(IR1Value);  
  if(IR1Value == true)
  {
    tone (Buzzer, 262, 250);
    delay(250);
  }
    if(IR2Value == true)
  {
    tone (Buzzer, 330, 250);
    delay(250);
  }
    if(IR3Value == true)
  {
    tone (Buzzer, 392, 250);
    delay(250);
  }
  noTone(Buzzer);
}
SHARE YOUR GUITAR!!
FINISHED!
previous arrow
next arrow

El Mega Maker Kit te ofrece el todo el material que necesitas para completar el itinerario, pero si dispones de otro kit, también puedes realizar algunos proyectos. Te animamos a que los revises todos, o que compres los componentes que necesites. Puedes verificar que actividades puedes realizar en nuestra página del Itinerario de aprendizaje.

2 0
0
¿Hablamos?
Necesitas Ayuda
¿Te ayudamos? 🙂

El horario en línea actualmente es de lunes a viernes de 10:00 a 13:30 y de 16:00 a 18:30 (hora España GTM+1). Si lo prefieres puedes enviarnos un correo a info@eboticseducation.com