Site Guide

Find your way around the Engineering Club.

Know what you need? Search for a component, concept or project.

Around the site

Start

Labs

TestingExperimental

Build

Club

LearnExperimental

Go a little deeper

Entry points to larger collections. Use Search for individual records.

Learning paths & reference

Inside PiCrawlerExperimental

Inside Inventory

Labs · ELEGOO Mega 2560

Mega Components

Practical lessons 2–33: build circuits, read sensors, and explore complete commented C++ programs.

Start with Mega setup: VS Code + PlatformIO →

Hardware has not been bench-tested. Lesson 16 keeps the two sensor variants separate; QMI8658C assembly is blocked pending identification. Lesson 21 UID writing is software review only until a suitable owned test card is identified.

32 labs
002

Blink

Configure a digital output and set its timing with delay().

Goal Blink the Mega’s onboard L LED once per second.

Mega labOpen lab →
003

LED

Observe how series resistance changes LED current and brightness.

Goal Power a red LED through a resistor and compare three resistor values.

Hardware-only · no program required

Mega labOpen lab →
004

RGB LED

Mix colors by varying three PWM outputs.

Goal Fade a common-cathode RGB LED from red to green to blue and back.

Mega labOpen lab →
005

Digital Inputs

Read active-low buttons with internal pull-ups.

Goal Use one button to turn an LED on and the other to turn it off.

Mega labOpen lab →
006

Active buzzer

Switch a self-oscillating buzzer on and off.

Goal Play active-buzzer beeps with shortening intervals, followed by a five-second sound.

Mega labOpen lab →
007

Passive Buzzer

Set sound frequency with tone() instead of a steady output.

Goal Play eight ascending notes through a passive buzzer.

Mega labOpen lab →
008

Tilt Ball Switch

Read a mechanical contact using INPUT_PULLUP.

Goal Turn the onboard L LED on when the tilt switch closes.

Mega labOpen lab →
009

Servo

Command servo positions while supplying motor power separately.

Goal Move an unloaded SG90 servo through 90°, 30°, 90° and 150°.

Mega labOpen lab →
010

Ultrasonic Sensor Module

Convert an echo pulse duration into distance.

Goal Print the HC-SR04’s measured distance once per second.

Mega labOpen lab →
011

Membrane Switch Module

Scan a row-and-column key matrix.

Goal Print each key pressed on a 4x4 membrane keypad.

Mega labOpen lab →
012

DHT11 Temperature and Humidity Sensor

Poll a non-blocking sensor driver without delaying its state machine.

Goal Print temperature and relative humidity from a DHT11 module.

Mega labOpen lab →
013

Analog Joystick Module

Read two analog channels and an active-low switch.

Goal Print the joystick’s X, Y and pushbutton readings.

Mega labOpen lab →
014

IR Receiver Module

Decode NEC infrared messages using IRremote 4.1.2.

Goal Print the supplied remote’s button names and repeat indications.

Mega labOpen lab →
015

MAX7219 LED Dot Matrix Module

Send display commands to a single MAX7219 module.

Goal Display “Arduino” letter by letter, then run row, column and individual-LED patterns.

Mega labOpen lab →
016

IMU Module: MPU-6050 / QMI8658C

Choose the correct sensor address, register order and driver for the actual IMU.

Goal Print raw acceleration, angular-rate and temperature readings from the identified IMU.

MPU-6050 · QMI8658C assembly blocked

Mega labOpen lab →
017

HC-SR501 PIR Sensor

Read a PIR module’s digital output and observe its retrigger and hold timing.

Goal Light the Mega’s onboard L LED when the HC-SR501 reports motion.

Mega labOpen lab →
018

Water Level Detection Sensor Module

Read an analog voltage and report only changes larger than ten ADC counts.

Goal Print changing conductivity-sensor readings in Serial Monitor.

Mega labOpen lab →
019

Real Time Clock Module

Use I2C clock registers and distinguish setting time from keeping time.

Goal Print calendar time from an identified RTC once per second.

Mega labOpen lab →
020

Sound Sensor Module

Distinguish an analog signal from a comparator threshold output.

Goal Print the microphone module’s analog samples while L follows its digital threshold output.

Mega labOpen lab →
021

RC522 RFID Module

Use Mega SPI pins and distinguish reading an identifier from writing a tag.

Goal Read a tag’s UID, with the supplied UID-writing experiment kept as a separate option.

Mega labOpen lab →
022

LCD Display

Drive a 16×2 LCD through its four-bit parallel interface.

Goal Show “Hello, World!” and elapsed seconds on a parallel LCD.

Mega labOpen lab →
023

Thermometer

Convert an NTC divider voltage into an approximate temperature using stated coefficients.

Goal Show an illustrative thermistor temperature on the parallel LCD.

Mega labOpen lab →
024

Eight LED with 74HC595

Shift a byte into a latched parallel-output register.

Goal Fill an eight-LED bar through a 74HC595, then clear and repeat.

Mega labOpen lab →
025

The Serial Monitor

Receive ASCII commands and send confirmation messages over USB Serial.

Goal Switch individual bar LEDs on from Serial Monitor commands.

Mega labOpen lab →
026

Photocell

Turn an analog divider reading into an eight-bit LED pattern.

Goal Change the number of lit bar LEDs with a photocell divider.

Mega labOpen lab →
027

74HC595 and Segment Display

Map stored digit bits to physical display segments through a shift register.

Goal Count from 9 down to 0 on a single common-cathode seven-segment display.

Mega labOpen lab →
028

Four Digital Seven Segment Display

Separate a shared segment pattern from digit selection and multiplexing.

Goal Show the same changing hexadecimal glyph on all four digits.

Mega labOpen lab →
029

DC Motors

Control an H-bridge without putting motor current through GPIO pins.

Goal Run a small DC motor through direction, coast, brake and PWM sequences.

Mega labOpen lab →
030

Relay

Separate a relay’s coil driver from its COM/NO load contacts.

Goal Switch a low-voltage DC motor on and off with a bare relay.

Mega labOpen lab →
031

Stepper Motor

Sequence a five-wire unipolar stepper through its ULN2003 driver.

Goal Turn a geared stepper about one revolution in each direction.

Mega labOpen lab →
032

Controlling Stepper Motor With Remote

Decode NEC remote commands while accounting for blocking motor moves.

Goal Command opposite stepper rotations with the kit remote’s VOL keys.

Mega labOpen lab →
033

Controlling Stepper Motor With Rotary Encoder

Handle encoder edges without waiting inside an interrupt.

Goal Move a stepper with a rotary encoder and return to its counted starting point.

Mega labOpen lab →