Learning Robotics and Programming can be easy and fun

Learn by doing path with maker projects from begginer to expert

Welcome! If you want to learn some electronics and programation stuff, you can follow this path using our 4in1 Build&Code board with all our components. It’s a learning by doing itinerary, starting from the basics and increasing the difficulty. When finished, you will we able to make fantastic projects, and obtain our Ebotics Maker Certification.

Wich is your main kit?

Control kit

Maker Kit 1

Maker Kit 2

Maker kit 3

Mega Maker

Code & Drive

Mini Lab

Maker control kit

In order to make all projects and proposals you need the Maker Mega kit. We recomend to view all projects in order, but with your kit, you can make only these projects:

1.1 - Power on one LED
1.2 - Flashing LED

1.3 - Flashing LED using variables
1.4 - LED brightness. PWM

2.1 - Read button state. Conditionals
2.2 - Power on LED with push button

2.3 - LED sequences by button state

18.1 - Third party APPs

18.2 - ON/OFF with AppInventor

Return to kit selection page

Maker Kit 1

In order to make all projects and proposals you need the Maker Mega kit. We recomend to view all projects in order, but with your kit, you can make only these projects:

1.1 - Power on one LED
1.2 - Flashing LED

1.3 - Flashing LED using variables
1.4 - LED brightness. PWM

2.1 - Read button state. Conditionals
2.2 - Power on LED with push button

2.3 - LED sequences by button state

3.1 - Read sensor state. Serial output
3.2 - Adjust LED brightness

3.3 - LED on or off by potentiometer
3.4 - LED and analog sensors

4.1 - Power on buzzer
4.2 - Play musical scale

4.3 - Change tone with potentiometer
4.4 - Vehicle emergency siren

9.1 - Servo at 0º, 90º and 180º
9.2 - Servo position by potentiometer

9.3 - Move when object detected at 20cm
9.2 - Servo position by potentiometer

Return to kit selection page

Maker Kit 2

In order to make all projects and proposals you need the Maker Mega kit. We recomend to view all projects in order, but with your kit, you can make only these projects:

1.1 - Power on one LED
1.2 - Flashing LED

1.3 - Flashing LED using variables
1.4 - LED brightness. PWM

2.1 - Read button state. Conditionals
2.2 - Power on LED with push button

2.3 - LED sequences by button state

3.1 - Read sensor state. Serial output
3.2 - Adjust LED brightness

3.3 - LED on or off by potentiometer
3.4 - LED and analog sensors

6.1 - RGB LED
6.2 - Rainbow

6.3 - Sound level warning
6.4 - Vehicle emergency siren

9.1 - DC Motor

10.2 - Vary speed with the potentiometer

12.1 - Black and white reading

12.2 - Follower Maker Robot

14.1 - Reading temperature in ºC and ºF
14.2 - Show temperature on display

14.2 - Show temperature with colors

Return to kit selection page

Maker Kit 3

In order to make all projects and proposals you need the Maker Mega kit. We recomend to view all projects in order, but with your kit, you can make only these projects:

1.1 - Power on one LED
1.2 - Flashing LED

1.3 - Flashing LED using variables
1.4 - LED brightness. PWM

2.1 - Read button state. Conditionals
2.2 - Power on LED with push button

2.3 - LED sequences by button state

5.1 - Ultrasound sensor. How it works

5.2 - Parking sensor

9.1 - Servomotor at 0º 90º and 180º
9.2 - Servo position by potentiometer

9.3 - Move when objet detected at 20cm

Return to kit selection page

Mega Maker Kit

Congratulations! Become a mega maker guy following our complete learning path

1.1 - Power on one LED
1.2 - Flashing LED

1.3 - Flashing LED using variables
1.4 - LED brightness. PWM

2.1 - Read button state. Conditionals
2.2 - Power on LED with push button

2.3 - LED sequences by button state

3.1 - Read sensor state. Serial output
3.2 - Adjust LED brightness

3.3 - LED on or off by potentiometer
3.4 - LED and analog sensors

4.1 - Power on buzzer
4.2 - Play musical scale

4.3 - Change tone with potentiometer
4.4 - Vehicle emergency siren

5.1 - Ultrasound sensor. How it works

5.2 - Parking sensor

6.1 - RGB LED
6.2 - Rainbow

6.3 - Sound level warning
6.4 - Vehicle emergency siren

7.1 - LCD Display - Your name
7.2 - Analog output by screen

7.3 - From computer to display

8.1 - Seven-segment display - Birthdate

8.2 - Analog output on display

9.1 - Servo at 0º, 90º and 180º
9.2 - Servo position by potentiometer

9.3 - Move when object detected at 20cm
9.2 - Servo position by potentiometer

10.1 - DC Motor

10.2 - Vary speed with the potentiometer

11.1 - Start / stop each motor
11.2 - Adjust speed and direction

11.3 - Build a little Maker Robot
11.4 - Avoid obstacles with the Maker Robot

12.1 - Black and white reading

12.2 - Follower Maker Robot

13.1 - Soil humidity reading program

13.2 - Automatic watering system

14.1 - Reading temperature in ºC and ºF
14.2 - Show temperature on display

14.3 - Show temperature with colors

15.1 - Sensor reading program

15.2 - Automatic closing window

16.1 - Sensor reading program

16.2 - Show all sensor values on display

17.1 - Power on light with button

17.2 - Using other digital inputs

18.1 - Third party APPs

18.2 - ON/OFF with AppInventor

Return to kit selection page

Code & Drive kit

In order to make all projects and proposals you need the Maker Mega kit. We recomend to view all projects in order, but with your kit, you can make only these projects:

1.1 - Power on one LED
1.2 - Flashing LED

1.3 - Flashing LED using variables
1.4 - LED brightness. PWM

2.1 - Read button state. Conditionals
2.2 - Power on LED with push button

2.3 - LED sequences by button state

3.1 - Read sensor state. Serial output
3.2 - Adjust LED brightness

3.3 - LED on or off by potentiometer
3.4 - LED and analog sensors

4.1 - Power on buzzer
4.2 - Play musical scale

4.3 - Change tone with potentiometer
4.4 - Vehicle emergency siren

11.1 - Start / stop each motor
11.2 - Adjust speed and direction

11.3 - Build a little Maker Robot
11.4 - Avoid obstacles with the Maker Robot

12.1 - Black and white reading

12.2 - Follower Maker Robot

18.1 - Third party APPs

18.2 - ON/OFF with AppInventor

Return to kit selection page

Mini Lab Kit

In order to make all projects and proposals you need the Maker Mega kit. We recomend to view all projects in order, but with your kit, you can make only these projects:

1.1 - Power on one LED
1.2 - Flashing LED

1.3 - Flashing LED using variables
1.4 - LED brightness. PWM

2.1 - Read button state. Conditionals
2.2 - Power on LED with push button

2.3 - LED sequences by button state

3.1 - Read sensor state. Serial output
3.2 - Adjust LED brightness

3.3 - LED on or off by potentiometer
3.4 - LED and analog sensors

4.1 - Power on buzzer
4.2 - Play musical scale

4.3 - Change tone with potentiometer
4.4 - Vehicle emergency siren

6.1 - RGB LED
6.2 - Rainbow

6.3 - Sound level warning
6.4 - Vehicle emergency siren

7.1 - LCD Display - Your name
7.2 - Analog output by screen

7.3 - From computer to display

9.1 - Servo at 0º, 90º and 180º
9.2 - Servo position by potentiometer

9.3 - Move when object detected at 20cm
9.2 - Servo position by potentiometer

18.1 - Third party APPs

18.2 - ON/OFF with AppInventor

Return to kit selection page

Slider
Project 1
DISCO LIGHT

Learn how to power on a led, control time to get intermitent lighting, and regulate brightness, like a real disco light!

BEFORE TO START

DIFFICULTY LEVEL: Beginner
DURATION OF THE ACTIVITY: 30 min.

MATERIALS:

1
Build&Code 4in1 board

Battery holder, USB cable and wires.

1 - Disco light - Components

The monochromatic LED is a module that puts out light of some fixed colour. You can use blue, green, yellow, red or white led modules for this exercise.

The 4in1 Build&Code circuit board is the brain, and we have to tell him what to do. How? Well, we can do it in different ways, grafically using blocks language or coding. In both cases we need to download a free software able to program our brain:

Mblock

Scratch inspired graphical programming language software by blocks

Arduino IDE

It makes it easy to write code and upload it to the board.

Check First steps document to connect your board properly or if you have some issue loading programs.

1. Power on one LED - Circuit

The 4in1 Build&Code circuit board has 12 digital ports (I/O). We can set each port to be an input, or an output.

Next step is to connect components. We are using Direct Current (DC) power supply with maximum 12V, so it's completly safe for us.
Each digital component has 3 pins: voltage (V) and ground (G) to power it, and signal (S) that could be in "high" (5V) or "low" (0V) state.

Connect wire from 4in1 board DIO3 to LED module according colours:

- Black: Ground
- Red: Voltage
- Yellow: Signal

1.1 Power on one LED - Program

To power a led, as any other digital actuator, we need to define an output port, and set it to "high" or "low" level state, setting it with a value "1" or "0", "on" or "off"

Arduino Coding
int LED = 3;             // CONNECT LED TO DIGITAL IO 3

void setup() {
  pinMode(LED, OUTPUT);   // DEFINE AS OUTPUT
}

void loop() {
  digitalWrite(LED, HIGH);  // POWER ON LED
}
1.2 Flashing LED

You know how to power on a LED, now, we want it to flash! We will define 1 sec ON and 1 sec OFF continously

Using the same circuit, we will add some code:

Block coding
Arduino code
 
int LED = 3; // DEFINE LED DIGITAL OUTPUT TO DIO 3

void setup() {
  pinMode(LED, OUTPUT);   // DEFINE DIO PIN AS OUTPUT
}

void loop() {
  digitalWrite(LED, HIGH);  // POWER ON LED
  delay(1000);              // WAIT ONE SECOND (1000ms = 1s)
  digitalWrite(LED, LOW);   // POWER OFF LED
  delay(1000);              // WAIT ONE SECOND (1000ms = 1s)
}

Try to get different speeds, modify time from 1 second to 1/4s, 2s and 10 s.
Probably you need a different flash rythm. Do it modifying time of "HIGH" and "LOW" states.

1.3 Flashing LED - Variables

When coding, we can use variables, a symbolic name associated with a value that can be changed easily in definition, or during progam execution.
We need to define it, assign a initial value, and use that name instead of numbers directly in our functions. Try it!

Arduino code
int LED = 3; // DEFINE LED TO DIO 3
int time1 = 3000;  //DEFINE VARIABLE WITH TIME POWERED ON/OFF IN MILISECONDS
void setup() {
  pinMode(LED, OUTPUT);   // DEFINIR PIN COMO SALIDA
}

void loop() {
  digitalWrite(LED, HIGH);  // POWER ON LED
  delay(time1);             // WAIT MILISECONDS DEFINED IN TIME1 VAR
  digitalWrite(LED, LOW);   // POWER OFF LED
  delay(time1);             // WAIT MILISECONDS DEFINED IN TIME1 VAR
}

If you want to have different rythm, you will need to add a second variable, so "on" time and "off" time are different. Do it!

1.4 LED brightness - PWM

Leds are ON or OFF components, as digital output, they can not be half powered to get less brightness. The solution is flashing it very fast, getting fast pulses that our eyes cannot see. As fast as 25000 pulses every second!

Adjusting different time for "LOW" and "HIGH" state, we can perceive different led brightness. This is called pulse-width modulation (PWM). This is also used to control other devices, we will see in next activities.

The 4in1 board has also analog outputs, where numeric values from our code is converted to variable voltage level. In our program we can set it from 0 to 255 value, and voltage output will be from 0 to 5 Volts Internally this is done using PWM and some electronics (low pass filter)

Interesting but....
I want to code!
Next please?
1.4 LED Brightness - PWM
Block coding
Arduino code
int LED = 3;      // DEFINE LED DIGITAL OUTPUT TO DIO 3
int brillo = 0;   // VARIABLE TO DEFINE LED BRIGHTNESS
void setup() {
  pinMode(LED, OUTPUT);   // DEFINE DIO PIN AS OUTPUT
}

void loop() {
  analogWrite(LED, brillo);  // ADJUST PWM ACCORDING BRIGHTNESS VARIABLE
  delay(250);                // WAIT 250 MILISECONDS
  brillo = brillo + 10;      // INCREMENT VARIABLE VALUE IN 10
}

Arduino has a function specifically designed to do PWM over any digital output. It just need two values, digital pin and PWM value from 0 to 255

Final project - DISCO LIGHTS

Now you can add all your led modules, and do them shine as you want! You can download cardboard templates to build it, and see below an example code. Feel free to use different combinations, different times for each led....

Block coding
Arduino code
int led_blanco = 2;
int led_rojo = 3;
int led_verde = 4;
int led_amarillo = 5;
int led_azul = 6;

int velocidad = 500;

void setup() {
  pinMode(led_blanco, OUTPUT);
  pinMode(led_rojo, OUTPUT);
  pinMode(led_verde, OUTPUT);
  pinMode(led_amarillo, OUTPUT);
  pinMode(led_azul, OUTPUT);
}

void loop() {
  for (int i = 0; i < 10; i++) {
    delay(200);
    digitalWrite(led_blanco, LOW);
    delay(200);
    digitalWrite(led_blanco, HIGH); 
  }
  
  delay(velocidad);
    
  int brillo = 0;
  while (brillo > 255) {
    brillo = brillo + 5; 
    analogWrite(led_rojo, brillo); 
    delay(100);
  }

  delay(velocidad);
  digitalWrite(led_verde, HIGH);
  delay(velocidad);
  digitalWrite(led_amarillo, HIGH);
  delay(velocidad);
  digitalWrite(led_azul, HIGH);
  delay(velocidad);
  digitalWrite(led_azul, LOW);
  delay(velocidad);
  digitalWrite(led_amarillo, LOW);
  delay(velocidad);
  digitalWrite(led_verde, LOW);

  brillo = 255;
  while (brillo < 0) {
    brillo = brillo - 5;  
    analogWrite(led_rojo, brillo);
    delay(100);
  }

}
previous arrow
next arrow
Slider
Project 2
SHAPED LAMP

Build a lamp and learn different ways to use a button, or how to use other elements to interact with it

BEFORE TO START

DIFFICULTY LEVEL: Beginner
DURATION OF THE ACTIVITY: 30 min.

MATERIALS

1 - Build&Code 4in1 board
5 - Monochromatic Led light
1 - Switch button module
1 - PIR motion sensor
1 - Finish line sensor
Battery holder, USB cable and wires.

2 - Shaped lamp - Components

You already know the brain, 4in1 Build&Code board, and the digital output LED module.

In this project we also use digital input modules or sensors so we can interact fisically with output modules

Blue led digital output

Digital input sensors usually has HIGH state in signal pin when some happens over them. When buttons and switchs are pressed or PIR detects movement. Do you remember other digitals sensors?

2 - Shaping lamp - Circuit

The 4in1 Build&Code circuit board has 12 digital ports (I/O). We will set port 4 to be an output, and port 9 to be output, but remember, any DIO port can be used!

1.- Connect wire from 4in1 board DIO4 to LED

2.- Connect wire from 4in1 board DIO3 to Button

3.- Connect power or batteries to main board.

Pay attention to colors! should match. What do you think can happen if you reverse de board connector? Yes, sure it won't work! Why?

Voltage line is in the middle, so will be right anyway, no risk of damaging any component by reverse polarity. Module ground will be in signal pin, so module cannot be powered.

2.1 Read button state. Conditional sentence

With digital sensors, we just need to define an input port and read his state ("high" or "low")
Most common is do something according the reading. We can use CONDITIONAL SENTENCES, for example, let's code: "if button is pressed, turn on the light, if not, turn off" using if/else sentence.

Block Coding
Arduino Coding
int PLED = 3; // White LED connected to digital port 3
int PButton = 4, ValueButton; // Button connected to digital port 4. Button reading variable

void setup() {
  pinMode (PLED, OUTPUT); // Configuration of the LED as output signal
  pinMode (PButton, INPUT); // Configuration of the button as the input signal
}

void loop() {
  ValueButton = digitalRead(PButton); // Button status reading
  if (ValueButton == HIGH) // If the button is pushed
    digitalWrite(PLED, HIGH); // LED = ON
  else // If the button is not pushed
    digitalWrite(PLED, LOW); // LED off
}

Note we can use different sentences when reading binary variables or inputs. High state is same as number 1, and can be identified also as "true", so "if(X=HIGH)", "if(X=1)" or just"if(X)" is the same condition.

2.2 Power on LED with push button

Now we want to change between LED states when button is pushed. So light will be turned on when button is pushed, and remains until button is pushed again to turn off light.

A variable can be used to save the lamp state, and actuate accordingly when button is pushed. Another option is read output state directly.

Block coding
Arduino code
int State = 0;  //Push button counter
int Button = 0; //State of button
int Puls = 0;   //State of lamp (0 or 1)

void setup() {
  pinMode(3, OUTPUT); // Digital port LED
  pinMode(4, INPUT);  // Digital port Botton
}

void loop() {
  Button = digitalRead(4);
  if (Button == 1)    //If button pressed
  {
    State = State + 1; //increment counter
    delay(300);
  }
  Puls = State % 2;  // even and odd? to get binary variable

  if (Puls == 0)
    digitalWrite (3, HIGH);
  else
    digitalWrite (3, LOW);
}

How would you do for same action, but only change state with button long press? Probably you have to read input two times and then actuate, and remember you used delays before!

2.3 LED sequences by button state

See de code below, what do you think will happen??

Block coding
Arduino code
void setup() {
  pinMode(3, OUTPUT); //Define DIO3 as output
  pinMode(4, INPUT);  //Define DIO3 as input
}

void loop() {
  while (true) {                  
    if (digitalRead(4) == HIGH) {  //Read input state
      int i = 0;                   //reset i value to 0
      while (i <= 3) {             //4 time loop as i increases 1 every time
        digitalWrite(3, HIGH);     
        delay(200);
        digitalWrite(3, LOW);
        delay(200);
        i = i + 1;
      }
    }
  }
}

I think every time I press the button, LED will blink 4 times and remain off until new button press. No? Yes? You agree? Incredible!!

Are you able to get led blink with different patterns, when button is pressed fastly or with long press? Or maybe you prefeer to modify cadence in every press?

Let's play!
2.4 LED and digital sensors

If you have PIR motion sensor module or Finish line sensor you can repeat previous exercises replacing button module.

Them work identically, but instead of our hand, other ambient conditions will activate light.

More public places has automatic lighting when somebody is near. You can do also with PIR motion sensor, it will detect movements and then, as the button coded before, will turn on light. You can add a delay to turn off after some time without movement.

PIR Sensor

Many machines use microswitch to control desplacements, limits of movement to safe operation or control position of moving parts.. Finish line sensor also uses a microswitch! Imagine you want a light warning every time a door is opened. You can do it!!

Final project - SHAPED LAMP

Now you can create your special and personalized lamp! It can shine as you decide!
Get cardboard templates to build it, and use the example code to start, but remember, your can adapt it to your needs!!

Block coding
Arduino code
int modo = 0;

void setup() {
  pinMode(2, OUTPUT);
  pinMode(13, INPUT);
  pinMode(11, INPUT);
  pinMode(12, INPUT_PULLUP);
  modo = 0;
}

void loop() {
  if (digitalRead(10)) {
    modo += 1;
    delay(700);
  }

  if (modo == 0) {
    digitalWrite(2, LOW);
  }

  if (modo == 1) {
    digitalWrite(2, HIGH);
  }

  if (!(digitalRead(12)) || digitalRead(11)) {
    digitalWrite(2, HIGH);

  } else {
    if (modo == 2) {
      digitalWrite(2, LOW);
      delay(200);
      digitalWrite(2, HIGH);
      delay(200);
    }
  }

  if (modo == 3) {
    modo = 0;
    delay(200);

  }
}
previous arrow
next arrow
Slider