Online course · Engineering
Microcontrollers from Zero: Raspberry Pi Pico 2 W with MicroPython and C
Wire, code and test real circuits on a Pico 2 W, from first blink to a farm alarm
Created by TrainSkool Trainer
- Engineering
- Beginner
- English
- 27 lessons
- 11h 32m
- 9 assessments
- Certificate
Coming soon Launch price ₹999
This course is not open for enrolment yet.
About this course
A practical first course in microcontrollers for students, diploma and engineering learners, makers and anyone who wants to build real electronic products. No prior programming or electronics background is needed. You work on a real Raspberry Pi Pico 2 W board in every lesson: each has a lab with a parts list, a wiring table, complete code, the flashing command, the serial output you should see and a pass line an automated test rig can check. You will learn safe 3.3 V wiring, MicroPython on the board, LEDs and buttons, debouncing and timers, analog sensors and the ADC, I2C sensors and an OLED display, logging to flash, PWM for dimming, servos and sound, Wi-Fi, HTTP and MQTT, and then the same skills in C with the Pico SDK. One running example follows Kaveri Embedded Labs, a fictional Coimbatore firm, and ends in a capstone: a soil-moisture alarm for a coconut and banana farm, graded with a 100-point rubric. Included: 27 text lessons with slides and quick checks, 25 auto-checked exercises that model the board logic on a computer, seven chapter projects, chapter quizzes, a final exam and a certificate of completion. Lessons are text and slides; trainer videos recorded with a live board are coming later. Budget kit: a Pico 2 W, a breadboard and a small sensor kit. Not affiliated with or endorsed by Raspberry Pi Ltd, Espressif, STMicroelectronics or Arm. What you will be able to do: - You will be able to wire LEDs, buttons, sensors and a servo to a Pico 2 W safely at 3.3 V - You will be able to flash MicroPython, use the REPL and mpremote, and run code at boot - You will be able to write non-blocking loops with debounced buttons, timers and state machines - You will be able to read analog and I2C sensors, calibrate them and convert raw counts to real units - You will be able to drive PWM outputs for dimming, servo angles and alarm tones - You will be able to connect to Wi-Fi, serve a status page and publish MQTT telemetry reliably - You will be able to build and flash C programs with the Pico SDK, CMake and UF2 files - You will be able to design, test and document a complete soil-moisture alarm product
What you'll learn
- Wire LEDs, buttons, sensors and a servo to a Pico 2 W safely at 3.3 V
- Flash MicroPython, use the REPL and mpremote, and run code at boot
- Write non-blocking loops with debounced buttons, timers and state machines
- Read analog and I2C sensors, calibrate them and convert raw counts to real units
- Drive PWM outputs for dimming, servo angles and alarm tones
- Connect to Wi-Fi, serve a status page and publish MQTT telemetry reliably
- Build and flash C programs with the Pico SDK, CMake and UF2 files
- Design, test and document a complete soil-moisture alarm product
Course content
Chapter 1 · Module 1: Meet the Microcontroller - Pico 2 W, Electricity Basics and Safety
- Code lab: What a Microcontroller Is and a Tour of the Pico 2 WLook around any Indian home or workplace and count the small computers you cannot see.18 topics · 22 min
- Code lab: Electricity You Need: Voltage, Current, Resistance and Safe WiringMost beginner boards are not killed by bad code. 3 V pin, a servo powered from a GPIO, two wires shorted while the board is plugged in.21 topics · 25 min
- Code lab: Setting Up: Flashing MicroPython, the REPL and Your First BlinkEvery embedded project starts the same way: get a known program onto the board, see it run, and confirm you can talk to it.26 topics · 25 min
Chapter 2 · Module 2: MicroPython Basics - GPIO, LEDs and Buttons
- Code lab: Python on a Chip: Files, main.py, mpremote and How Code RunsTyping lines into the REPL is great for experiments, but a product has to run on its own.18 topics · 22 min
- Code lab: Digital Outputs: LEDs, Timing and a Traffic-Light State MachineSwitching an output on and off is the most basic thing a microcontroller does, and it is also most of what many real products do: a pump-room indicator, a machine's run/fault lamp, a battery…19 topics · 25 min
- Code lab: Digital Inputs: Buttons, Pull-ups and DebouncingOutputs let a microcontroller act; inputs let it notice the world. The simplest input is a push button, and it is surprisingly easy to get wrong.18 topics · 25 min
- Code lab: Interrupts, Timers and Non-blocking LoopsEvery program so far has done one thing at a time. The traffic lights slept while a lamp was lit; the button program spent all its time watching the button.25 topics · 28 min
Chapter 3 · Module 3: Reading the Analog World - ADC and Sensors
- Code lab: How the ADC Works: Resolution, Reference and Voltage Dividers3 V) or low (about 0 V), a button was pressed or it was not. The real world is not like that.18 topics · 22 min
- Code lab: Light and Temperature: Converting Raw Counts to Real UnitsA number from the ADC is only the first half of a measurement.18 topics · 22 min
- Code lab: Soil Moisture: Calibration, Filtering and Thresholds with HysteresisThis is the lesson where the course project starts to become real. Selvam grows coconut and banana near Pollachi.24 topics · 25 min
Chapter 4 · Module 4: I2C Sensors and an OLED Display
- Code lab: The I2C Bus: Addresses, Pull-ups and ScanningThe analog sensors in Module 3 each needed their own ADC pin, and the Pico 2 W has only three.19 topics · 22 min
- Code lab: Reading an AHT20 Temperature and Humidity Sensor from Its DatasheetMany beginners never read a datasheet. They search for a library, copy three lines, and hope.18 topics · 25 min
- Code lab: Showing Data on an SSD1306 OLEDSelvam will not carry a laptop into his banana plot to read a serial port.18 topics · 22 min
- Code lab: Logging Readings to Flash: CSV Files, Timestamps and Flash WearAn alarm tells Selvam what is happening now.24 topics · 22 min
Chapter 5 · Module 5: PWM - Dimming, Servos and Sound
- Code lab: PWM Basics: Frequency, Duty Cycle and LED DimmingSo far every output you have driven was either fully on or fully off. 3 V; there is no "half on" setting.18 topics · 25 min
- Code lab: Driving a Servo Safely: Pulse Widths and a Separate SupplyA hobby servo is the cheapest way to make a microcontroller move something to a chosen position: open a small flap, turn a pointer on a dial, press a button on another device, tilt a sensor.17 topics · 25 min
- Code lab: Buzzers, Tones and Alarm Patterns, and Why Motors Need a DriverAn alarm that nobody notices is not an alarm. On Selvam's farm the soil-moisture box sits in a pump shed, and the people who must react to it are working in the plantation, not staring at an LED.23 topics · 25 min
Chapter 6 · Module 6: Wi-Fi on the Pico 2 W
- Code lab: Connecting to Wi-Fi: Status Codes, Secrets and Network TimeUntil now the farm box could only shout into an empty shed. With Wi-Fi it can tell Selvam on his phone that the banana block is dry while he is in Pollachi town buying fertiliser.16 topics · 25 min
- Code lab: HTTP: Calling a Web API and Serving a Tiny Status PageHTTP is the language of the web, and a microcontroller with Wi-Fi can speak it in both directions.17 topics · 25 min
- Code lab: MQTT Telemetry and Keeping a Device Online2 waits for someone to come and ask. Most connected devices instead report on their own to a central place where an app or alert rule picks the data up.23 topics · 25 min
Chapter 7 · Module 7: Moving to C with the Pico SDK
- Code lab: Why C, the Toolchain and Your First Pico SDK BuildFor six chapters Meena has written MicroPython at Kaveri Embedded Labs in Coimbatore.18 topics · 25 min
- Code lab: GPIO in C: Blinking the Wireless-Chip LED and Reading a Buttonvalue(). The same ideas exist in C, but you now call the SDK's functions yourself and you decide exactly when each thing happens.18 topics · 25 min
- Code lab: ADC and PWM in CThe soil alarm lives on two peripherals more than any others: the ADC, which turns the sensor's voltage into a number, and PWM, which makes the buzzer sing and could dim a display backlight.18 topics · 25 min
- Code lab: I2C in C: Reading the AHT20 and Printing over USB Serial2 Meena read the AHT20 temperature and humidity sensor from MicroPython by sending three bytes and reading back six or seven.25 topics · 25 min
Chapter 8 · Module 8: Capstone - A Farm Soil-Moisture Alarm
- Reading: The Brief, Requirements and DesignSelvam grows coconut and banana on a few acres near Pollachi, about 40 km south of Coimbatore.11 topics · 35 min
- Code lab: Build, Test and CalibrateThis lesson is where Meena's soil alarm meets real soil, a real sensor and real Wi-Fi that drops out.15 topics · 45 min
- Assignment: Deliverables, Demonstration and Grading RubricSelvam will never read your code. He will see three lights, hear a beep and perhaps get a message on his phone.14 topics · 30 min
Assessments and certificate
- Module 1 quiz: Meet the Microcontroller - Pico 2 W, Electricity Basics and Safety8 questions · 15 min · pass mark 70%
- Module 2 quiz: MicroPython Basics - GPIO, LEDs and Buttons8 questions · 15 min · pass mark 70%
- Module 3 quiz: Reading the Analog World - ADC and Sensors7 questions · 15 min · pass mark 70%
- Module 4 quiz: I2C Sensors and an OLED Display8 questions · 15 min · pass mark 70%
- Module 5 quiz: PWM - Dimming, Servos and Sound8 questions · 15 min · pass mark 70%
- Module 6 quiz: Wi-Fi on the Pico 2 W8 questions · 15 min · pass mark 70%
- Module 7 quiz: Moving to C with the Pico SDK8 questions · 15 min · pass mark 70%
- Module 8 quiz: Capstone - A Farm Soil-Moisture Alarm7 questions · 15 min · pass mark 70%
- Microcontrollers from Zero: Raspberry Pi Pico 2 W with MicroPython and C — final assessment20 questions · 40 min · pass mark 70%