Assignment requirements
Group assignment
- Test an input device(s)'s analog levels and digital signals (As a minimum, you should demonstrate the use of a multimeter and an oscilloscope
- Document your work on the group work page and reflect on your individual page what you learned
Individual assignment
- Measure something: add a sensor to a microcontroller board that you have designed and read it
Progress status
Test an input device analog levels and digital signals
Add a sensor to a microcontroller board that you have designed and read it
Upload source files.
1) Introduction
Closing gaps
- Learn about input devices
- Interact more with Arduino IDE
- Discuss the group project
- Develop the individual project
2) Group assignment 1 - Test an input devices (analog & digital)
For more details visit Fab Lab Peru - Group Assignment: https://fabacademy.org/2026/labs/lima/#page-top
Project idea
- Ultrasonic HC-SR04 sensor module
- Measures distance using sound waves
- Includes transmitter and receiver
- Range: 2 cm to 500 cm
- Pins: Vcc, Trig, Echo, GND






Video demonstration
3) Group assignment 2 - Test an input devices (analog & digital)
More information at Fab Lab Peru - Group Assignment: https://fabacademy.org/2026/labs/lima/#page-top
Project idea
- Distance detection
- Driving ability - 15mA with adjustable potentiometer
- Brightness - Adjustable
- Detect - brightness and light intensity
- Analog and digital output






Video demonstration
4) Individual assigment
Problems
Designed microcontroller board doesn't work
Posible solution - make a new board
Step 1 - Protoboard
Mesasure something with the microcontroller Xiao ESP32 C3
Step 2 - Repeat with a new board
Measure and test devices using a multimeter or an oscilloscope
// TCRT5000L reflective optical sensor
// Input devices
// Board: Seeed Studio XIAO ECP 32 C3
#define sensor = D6; // cambia al GPIO/pin que uses
void setup() {
Serial.begin(115200);
pinMode(sensor, INPUT);
}
void loop() {
int val = digitalRead(sensor);
Serial.println(val);
delay(100);
}
// Using three TCRT5000L reflective optical sensor
// Input devices
// Board: Seeed Studio XIAO ESP 32 C3
#define sensor1 D6 // cambia al GPIO/pin que uses
#define sensor2 D5 // cambia al GPIO/pin que uses
#define sensor3 D4 // cambia al GPIO/pin que uses
void setup() {
Serial.begin(115200);
pinMode(sensor1, INPUT);
pinMode(sensor2, INPUT);
pinMode(sensor3, INPUT);
}
void loop() {
int val1 = digitalRead(sensor1);
int val2 = digitalRead(sensor2);
int val3 = digitalRead(sensor3);
if(val1==1){
Serial.println("izquierda");
}
else if(val2==1){
Serial.println("centro");
}
else if(val3==1){
Serial.println("derecha");
}
else{
Serial.println("error");
}
delay(100);
}
// Using three TCRT5000L reflective optical sensor & buzzer - Center or not
// Input devices
// Board: Seeed Studio XIAO ESP 32 C3
#define sensor1 D6 // cambia al GPIO/pin que uses
#define sensor2 D5 // cambia al GPIO/pin que uses
#define sensor3 D4 // cambia al GPIO/pin que uses
void setup() {
Serial.begin(115200);
pinMode(sensor1, INPUT);
pinMode(sensor2, INPUT);
pinMode(sensor3, INPUT);
pinMode(D3, OUTPUT);
}
void loop() {
int val1 = digitalRead(sensor1);
int val2 = digitalRead(sensor2);
int val3 = digitalRead(sensor3);
if(val1==1){
Serial.println("izquierda");
digitalWrite (D3, HIGH);
delayMicroseconds (5000);
digitalWrite (D3, LOW);
delayMicroseconds (100000);
}
else if(val2==1){
Serial.println("centro");
}
else if(val3==1){
Serial.println("derecha");
digitalWrite (D3, HIGH);
delayMicroseconds (5000);
digitalWrite (D3, LOW);
delayMicroseconds (100000);
}
else{
Serial.println("error");
digitalWrite (D3, HIGH);
delayMicroseconds (5000);
digitalWrite (D3, LOW);
delayMicroseconds (100000);
}
delay(100);
}
5) Final project advance
Running
Explore devices
Found more band for runners
Swimming
Explore an olympic pool
Devices
Grove Vision AI V2-HX6538 Processor
Camera CSI OV5647
Color and gesture sensor - RGB GY-9960-3.3 APDS-9960
6) Final results
- Linked to the group assignment page
- Documented what you learned
- Documented your design and fabrication process
- Explain how your code works
- Explained any problems and how you fixed them
- Include original design filess and source code
- Included a 'hero shot' of your board
7) References files
We learn how to design, make and test a PCB with sensor. Files: in each section