SunFounder Kepler Kit for Raspberry Pi Pico W: lesson by lesson, simulated
The kit’s MicroPython lessons, in order, each a program that runs on a simulated Pico W in your browser with the kit’s parts on the GP pins its code uses: from a blinking LED and a keypad game to joining WiFi and serving a web page.
Not affiliated with SunFounder. Lesson titles are referenced so you can follow along.
Every lesson in the kit’s order
Lesson numbers and titles follow the MicroPython lessons of the online tutorial (read November 2026). Each circuit uses the kit’s parts on the pins the lesson uses.
48 of the 57 lessons with a circuit run here, 10 of them with a change we name, 9 coming soon, 6 setup lessons need no circuit.
- 1.1
Introduction of MicroPython
No circuitWhat MicroPython is. Every lesson below runs the real MicroPython firmware for the Pico W.
- 1.2
Install Thonny IDE
No circuitInstalling an editor on the computer. The editor here runs in the browser, with nothing to install.
- 1.3
Install MicroPython on Your Pico
No circuitPutting the MicroPython firmware on the board. The simulated Pico W boots it already.
- 1.4
Upload the Libraries to Pico
No circuitCopying the kit’s driver files onto the board. Here each lesson that needs a driver carries its own in a tab, copied on at Run.
- 1.5
Quick Guide on Thonny
No circuitRunning, stopping and saving a program. Run and the Serial Monitor here do the same jobs.
- 1.6
(Optional) MicroPython Basic Syntax
No circuitA primer on Python syntax: variables, loops, lists and functions. No circuit.
- 2.1
Hello, LED!
Runs hereAn LED and a 220 ohm resistor on GP15, switched on and off once a second.
- 2.2
Display the Level
Runs hereA ten-segment LED bar on GP6 to GP15, a 220 ohm on each segment, filling up one segment at a time and then emptying.
- 2.3
Fading LED
Runs herePWM on GP15 raises the LED’s duty cycle in small steps, so it brightens slowly.
- 2.4
Colorful Light
Runs hereA common-cathode RGB LED on GP13, GP14 and GP15 (330 ohm on red, 220 on the others) mixes orange from three PWM levels.
- 2.5
Reading Button Value
Runs hereA button from 3.3 V to GP14 with a 10k pull-down: each press prints a line.
This is the lesson’s pull-down wiring; it also shows a pull-up version, which reads the other way around.
- 2.6
Tilt It!
Runs hereA ball tilt switch from 3.3 V to GP14 with a 10k pull-down: tip it over and the program says it opened.
- 2.7
Toggle Left and Right
Runs hereA slide switch with its middle leg on GP14 puts the pin on 3.3 V or ground, with a 10k and a 100 nF capacitor to steady it.
- 2.8
Press Gently
Runs hereA lever micro switch with its common leg on GP14 reads 1 while pressed and 0 at rest.
- 2.9
Feel the Magnetism
Runs hereA reed switch from 3.3 V to GP14 closes when a magnet comes near, and a pin interrupt counts each time.
- 2.10
Detect Human Movement
Runs hereA PIR motion sensor on GP14 raises an interrupt when someone moves, and the program times each spell of movement and quiet.
- 2.11
Turn the Knob
Runs hereA potentiometer on GP28 (ADC2) sets the PWM brightness of the LED on GP15, and its reading is printed.
- 2.12
Feel the Light
Runs hereA photoresistor and a 10k divide 3.3 V with the middle on GP28: more light, a lower reading.
- 2.13
Thermometer
Runs hereA 10k thermistor divider on GP28, turned into Celsius and Fahrenheit with the beta equation.
- 2.14
Feel the Water Level
Runs hereA water level sensor on GP28 reads higher the more of it is wet, and warns of a leak over 30000.
- 2.15
Two Kinds of Transistors
Runs hereA button on GP14 is copied to GP15, which switches an LED through an S8050 NPN transistor.
This is the lesson’s S8050 (NPN) circuit. With the S8550 (PNP) in its place, the same program lights the LED while the button is up instead.
- 2.16
Control Another Circuit
Runs, with a changeGP15 drives an S8050 that pulls in a relay, with a 1N4007 across its coil, and the relay’s contact switches an LED on and off every two seconds.
The relay’s coil is fed from VBUS (5 V) here. The lesson feeds it from 3.3 V, which is below the pull-in voltage of a 5 V relay, so the simulated one would stay open. A two-pole relay plays the kit’s one-pole relay; one pole is used.
- 3.1
Beep
Runs hereGP15 switches an S8050 that sounds an active buzzer: four short beeps, a pause, and again.
- 3.2
Custom Tone
Runs herePWM on GP15 drives a passive buzzer through the S8050: three notes, 440, 494 and 523 Hz.
- 3.3
RGB LED Strip
Runs hereEight WS2812 pixels on GP0, fed from VBUS, each given its own color, then the colors turned along the strip.
The program uses MicroPython’s own neopixel module where the lesson loads the kit’s ws2812.py; the strip sees the same data.
- 3.4
Liquid Crystal Display
Runs hereAn I2C LCD1602 on I2C1, SDA on GP6 and SCL on GP7, shows two messages in turn.
The lesson’s text says pins 20 and 21, but its code and drawing use GP6 and GP7, as here.
- 3.5
Small Fan
Runs, with a changeGP14 and GP15 drive a DC motor through a motor driver: a second one way, a stop, a second the other way.
The kit’s TA6586 motor driver is not simulated, so an L9110S plays it: the same two inputs per motor (GP14 and GP15) and the same truth table. It runs from the Pico W’s 3.3 V here, where the kit uses its Li-po charger module: on 5 V the L9110S would not read the Pico W’s 3.3 V outputs as high.
- 3.6
Pumping
Runs, with a changeGP14 high and GP15 low keep a small water pump running through the motor driver.
The kit’s TA6586 motor driver is not simulated, so an L9110S plays it: the same two inputs per motor (GP14 and GP15) and the same truth table. It runs from the Pico W’s 3.3 V here, where the kit uses its Li-po charger module: on 5 V the L9110S would not read the Pico W’s 3.3 V outputs as high.
- 3.7
Swinging Servo
Runs here50 Hz PWM on GP15 sweeps an SG90 servo from 0 to 180 degrees and back.
- 4.1
Toggle the Joystick
Runs hereA joystick with X on GP27, Y on GP26 and its press switch on GP22 with a 10k pull-up, printed five times a second.
- 4.2
4x4 Keypad
Runs, with a changeA 4x4 keypad with rows on GP2 to GP5 and columns on GP6 to GP9, each column pulled down, scanned row by row.
The kit puts a 10k pull-down on each column; here the Pico W’s own pull-downs (Pin.PULL_DOWN) do the same job, so the resistors are left out.
- 4.3
Electrode Keyboard
Runs hereAn MPR121 touch module on I2C1 (GP6 and GP7) reports which of its twelve electrodes a finger is on.
The program reads the chip with a small mpr121.py of Mokxi’s, in its own tab.
- 5.1
Microchip - 74HC595
Runs hereA 74HC595 with DS on GP0, STcp on GP1 and SHcp on GP2 lights eight LEDs one more at a time, then clears them.
- 5.2
Number Display
Runs hereThe 74HC595 drives a common-cathode seven-segment digit through one 220 ohm on its common pins, counting 0 to 9.
- 5.3
Time Counter
Runs hereA 74HC595 on GP18 to GP20 and digit selects on GP10 to GP13 multiplex a four-digit display that counts the seconds.
Each digit’s select pin gets its own 220 ohm, as in the lesson, and the four digits are multiplexed a few milliseconds apart.
- 5.4
8x8 Pixel Graphics
Coming soonTwo chained 74HC595s scan an 8x8 LED matrix row by row to draw a cross.
The kit’s bare 8x8 LED matrix, driven by two 74HC595s, is not simulated yet. The MAX7219 matrix module is, if you want to try a matrix now.
- 6.1
Measuring Distance
Runs, with a changeAn HC-SR04 with TRIG on GP17 and ECHO on GP16, its echo timed with ticks_us() and turned into centimeters.
The HC-SR04 is fed from VBUS (5 V) here. The lesson powers it from 3.3 V, below the 4.5 V its datasheet asks for, and the simulated module, like the datasheet, does not range on 3.3 V. On 5 V its ECHO is a 5 V signal, so a 1k and a 2k divide it down to 3.3 V for GP16.
- 6.2
Temperature - Humidity
Runs hereA DHT11 on GP16 reports the temperature and the humidity every two seconds.
The program uses MicroPython’s own dht module where the lesson loads the kit’s dht.py.
- 6.3
6-axis Motion Tracking
Runs hereAn MPU6050 on I2C1 (GP6 and GP7) prints its acceleration and its rotation.
The program reads the chip with a small mpu6050.py of Mokxi’s, in g rather than the m/s² the kit’s imu.py gives.
- 6.4
IR Remote Control
Runs hereAn IR receiver on GP17 and the 21-button remote: each button’s NEC code is decoded and its name printed.
The decoder is a small nec.py of Mokxi’s, timed from pin interrupts, in place of the kit’s ir_rx folder.
- 6.5
Radio Frequency Identification
Runs, with a changeAn MFRC522 on SPI0 reads a card’s UID and the text stored on it, and stores text typed in the Serial Monitor on the next card.
The lesson has two programs, one to write and one to read; here one program does both. It uses a small mfrc522.py of Mokxi’s and stores the text in block 8.
- 7.1
Light Theremin
Runs hereA photoresistor on GP28 learns the light’s range for five seconds while the LED on GP16 is lit, then the light sets the buzzer’s pitch.
- 7.2
Room Temperature Meter
Runs hereThe thermistor divider on GP28 gives the temperature and the I2C LCD shows it every second.
- 7.3
Alarm Siren Lamp
Runs hereA slide switch on GP17 turns on a siren: the buzzer sweeps 130 to 800 Hz while the LED on GP16 pulses in step.
- 7.4
Passenger Counter
Runs hereEach time the PIR on GP16 sees someone, a pin interrupt adds one to the count on the four-digit display.
Each digit’s select pin gets its own 220 ohm, as in the lesson, and the four digits are multiplexed a few milliseconds apart.
- 7.5
GAME - 10 Second
Runs hereShake the tilt switch on GP16 to start and stop a stopwatch on the display; stop it on exactly 10.00 to win.
Each digit’s select pin gets its own 220 ohm, as in the lesson, and the four digits are multiplexed a few milliseconds apart.
- 7.6
Traffic Light
Runs hereGreen on GP7, yellow on GP8 and red on GP9 change on a timer, 30, 5 and 30 seconds, with the time left on the display.
The lesson’s text lists the colors in another order; its code and drawing put green on GP7 and red on GP9, as here.
- 7.7
Guess Number
Runs, with a changeA number game on the keypad (rows GP21 to GP18, columns GP13 to GP10) and the I2C LCD, which narrows the range after each guess.
The kit puts a 10k pull-down on each column; here the Pico W’s own pull-downs (Pin.PULL_DOWN) do the same job, so the resistors are left out.
- 7.8
RFID Music Player
Runs, with a changeLay a card on the reader and the notes stored on it play on the buzzer, with the WS2812 strip flashing a color per note.
Store the tune with lesson 6.5’s program here, which keeps it in block 8. A card with nothing stored plays a short tune of its own.
- 7.9
Fruit Piano
Runs hereEach of the MPR121’s twelve electrodes plays its own note while the RGB LED on GP13, GP12 and GP11 flashes a random color.
Touch the electrodes on the canvas; the fruit is left out.
- 7.10
Reversing Aid
Runs, with a changeAn HC-SR04 measures the gap, and the active buzzer on GP15 and the LED on GP14 beep faster as an obstacle gets closer.
The HC-SR04 is fed from VBUS (5 V) here. The lesson powers it from 3.3 V, below the 4.5 V its datasheet asks for, and the simulated module, like the datasheet, does not range on 3.3 V. On 5 V its ECHO is a 5 V signal, so a 1k and a 2k divide it down to 3.3 V for GP16.
- 7.11
Somatosensory Controller
Runs hereThe tilt of the MPU6050, worked out from gravity and averaged, turns the servo on GP15 to follow it.
- 7.12
Digital Bubble Level
Coming soonThe MPU6050’s tilt moves a two-by-two bubble around an 8x8 LED matrix.
The kit’s bare 8x8 LED matrix, driven by two 74HC595s, is not simulated yet. The MAX7219 matrix module is, if you want to try a matrix now.
- 8.1
Access to the Network
Runs hereThe Pico W joins WiFi, gives up after ten seconds if it cannot, and prints its IP address.
It joins Mokxi’s simulated access point, named by the board’s WiFi properties. The lesson also saves the network’s name and password in a file of their own; here they sit at the top of main.py.
- 8.2
Follow the @CheerLights
Coming soonThe strip on GP0 shows the CheerLights color, fetched from ThingSpeak once a minute.
Mokxi’s simulated network has no real internet, so this lesson’s cloud service cannot be reached from it. Coming once there is an honest stand-in.
- 8.3
Security System via @IFTTT
Coming soonWhen the PIR on GP17 fires, the buzzer sounds and an IFTTT webhook sends an email.
Mokxi’s simulated network has no real internet, so this lesson’s cloud service cannot be reached from it. Coming once there is an honest stand-in.
- 8.4
Real-time Weather From @OpenWeatherMap
Runs, with a changeJoin WiFi, fetch the weather and the time, and show both on the I2C LCD on GP6 and GP7.
OpenWeatherMap and NTP are on the real internet, which the simulated network does not reach. Here the weather comes from http://weather.mokxi/ (set it in the Cloud panel) and the time from http://time.mokxi/.
- 8.5
Cloud Calling System with @MQTT
Coming soonFour buttons on GP16 to GP19 each publish a message to a public MQTT broker.
Mokxi’s simulated network has no real internet, so this lesson’s cloud service cannot be reached from it. Coming once there is an honest stand-in.
- 8.6
Cloud Player with @MQTT
Coming soonA song name arriving on an MQTT topic plays that tune on the buzzer.
Mokxi’s simulated network has no real internet, so this lesson’s cloud service cannot be reached from it. Coming once there is an honest stand-in.
- 8.7
Setup a Web Server
Runs hereThe Pico W serves a web page on port 80 whose links set the RGB LED on GP13 to GP15 and which shows the thermistor’s temperature.
Open the board’s page from the Web panel. The 3.3 V supply comes from the Pico W’s USB rather than the kit’s Li-po charger.
- 8.8
Building Web APP with @Anvil
Coming soonThe DHT11’s readings go to an Anvil web app, and text typed in the app shows on the LCD.
This lesson needs Anvil’s own firmware for the Pico W and its cloud, neither of which runs here.
- 8.9
Play in @SunFounder Controller
Coming soonA phone app’s slider turns the servo and its gauge shows the HC-SR04’s distance, over a WebSocket on the local network.
This lesson talks to SunFounder’s phone app over a WebSocket on port 8765; the simulated network reaches a board’s port 80 only.
- 8.10
Plant Monitor in @SunFounder Controller
Coming soonA phone app shows the temperature, the humidity and the water level, and runs the pump at a press.
This lesson talks to SunFounder’s phone app over a WebSocket on port 8765; the simulated network reaches a board’s port 80 only.
Lesson list and pins read from SunFounder’s online tutorial. The explanations on this page are our own.
Everything the SunFounder Kepler Kit for Raspberry Pi Pico W can build
54 projects use only the parts in this box, ordered from a first blink to the hardest.
Beginner (31)
- Pico W joins WiFi in MicroPython
- MicroPython WiFi access point mode on a Pico W
- MicroPython WiFi station mode on a Pico W
- Pico W DHT11 temperature and humidity on GP16
- Pico W I2C LCD1602 on GP6 and GP7
- Pico W PIR motion sensor on GP14
- Pico W servo sweep on GP15
- Pico W water level sensor on GP28
- Pico W WS2812 strip of eight on GP0
- Operating point and sweep
- Hello, breadboard
- Pico W button on GP14 with a pull-down
- Pico W fading LED with PWM on GP15
- Pico W MicroPython blink on GP15
- Pico W joystick on GP27, GP26 and GP22
- Pico W LED bar graph fills and empties
- Pico W photoresistor divider on GP28
- Pico W reed switch interrupt on GP14
- Pico W RGB LED mixes orange with PWM
- Pico W thermistor thermometer on GP28
- Pico W tilt switch on GP14
- Pico W water pump on a motor driver
- Pico W chaser
- Three-way switch
- Pico W active buzzer beeps through an S8050
- Pico W knob on GP28 dims an LED on GP15
- Pico W micro switch on GP14
- Pico W slide switch on GP14
- Motion light
- NPN transistor switch
- Pico W button switches an LED through an S8050
Intermediate (18)
- MicroPython WiFi AP and station at once on a Pico W
- Pico W 4x4 keypad on GP2 to GP9
- Pico W MPR121 touch keyboard on I2C1
- Pico W MPU6050 acceleration and rotation
- Pico W WiFi weather and time on an I2C LCD
- Pico W HC-SR04 distance on GP17 and GP16
- Pico W infrared remote decoder on GP17
- Pico W fan motor both ways on a motor driver
- Pico W 74HC595 counts 0 to 9 on a digit
- Pico W 74HC595 fills eight LEDs
- Pico W four-digit display counts seconds
- Pico W room temperature on an I2C LCD
- Pico W passenger counter: PIR and four digits
- Pico W ten-second game with a tilt switch
- Pico W traffic light with a countdown display
- Motor starter circuit
- Pico W relay through an S8050 switches an LED
- Pico W reversing aid: HC-SR04 and a beeper
Add a few parts, unlock more projects
The smallest shopping lists that open the most new projects for the SunFounder Kepler Kit for Raspberry Pi Pico W.
Add Piezo speaker
Add Multimeter and Piezo speaker
Add Multimeter, ne555 and Piezo speaker
Unlocks 11 more projects:
Projects that combine two kits
Own another kit as well? These need parts from both boxes, and neither can build them alone.
The kit’s parts, and what plays them here
The parts in the SunFounder Kepler Kit for Raspberry Pi Pico W, by the names its maker gives them. Each one is in the editor’s parts panel.
- Raspberry Pi Pico W Raspberry Pi Pico W
- Breadboard Full-size breadboard The circuits here wire each part straight to the board’s pins.
- LEDs (red, green, blue, yellow, white) LED
- Resistors, 10 ohm to 1 megohm Resistor
- 1N4007 diode Diode
- Capacitors (104 ceramic, 10 uF) Capacitor
- S8050 and S8550 transistors Transistor (NPN or PNP)
- RGB LED RGB LED
- LED bar graph LED bar graph, 10 segments
- 7-segment display Seven segment display
- 4-digit 7-segment display Four-digit seven segment, multiplexed
- LED dot matrix (8x8) Not simulated yet; the MAX7219 matrix module is.
- I2C LCD1602 Character LCD with I2C backpack
- WS2812 RGB 8 LEDs strip Addressable RGB LEDs
- 74HC595 74HC595 shift register
- TA6586 motor driver Motor driver, L9110S Not simulated; the L9110S has the same two inputs per motor and plays it.
- Li-po charger module, power pack and battery holder The circuits here run from the Pico W’s USB power (VBUS and 3.3 V).
- Buttons Pushbutton
- Micro switch Limit switch, lever microswitch
- Slide switch Slide switch
- Reed switch Reed switch
- Tilt switch Tilt switch
- Potentiometer Potentiometer
- Infrared receiver Infrared receiver, VS1838B
- Infrared remote Infrared remote, 21 buttons
- Joystick module Thumb stick
- 4x4 keypad Keypad, 4x4
- MPR121 module Capacitive touch, MPR121
- MFRC522 RFID module, card and key fob RFID reader, MFRC522
- Photoresistor Light sensor
- Thermistor Thermistor, 10k NTC
- PIR motion sensor module Motion sensor
- Water level sensor module Water level sensor
- Ultrasonic module Ultrasonic ranger
- DHT11 Temperature and humidity, DHT22 Set to DHT11 in these circuits.
- MPU6050 module Accelerometer and gyroscope, MPU6050
- Active and passive buzzers Buzzer The passive buzzer is the piezo speaker part.
- Relay DPDT relay A two-pole relay; one pole is used.
- DC motor and fan blade DC motor
- DC water pump and tube Mini water pump
- 9G servo Hobby servo
- USB cable and jumper wires The editor connects the board for you, and wires are drawn between pins.
A link and a QR code for this page
Print either one beside a lesson, or tape it inside the box lid. Both open this page.
mokxi.com/k/sunfounder-kepler
The code is black on white with a quiet border, so it prints and scans at any size from 2 cm up.
Download the QR code (SVG)Make kits? See what we offer kit makers.
Questions about this page
Is this made by SunFounder?
No. Mokxi is independent and is not affiliated with SunFounder. The page follows the kit’s lessons so you can use the two side by side; the circuits, sketches and explanations are Mokxi’s own.
Do I need the kit?
No. Every lesson that runs here runs in the browser, so you can try them before you buy a kit, or keep going while a part is missing or broken.
Is the code the same as in my manual?
The pins and the parts are the same, and the programs are MicroPython running on the real MicroPython firmware, with the same built-in modules. The code itself is written for this page, with comments that explain each step, and a few small drivers of our own stand in for the kit’s driver files, so it will not match the manual line for line.
What do "with a change" and "coming soon" mean?
A lesson marked "with a change" runs, but something differs from the kit, and the note under it says exactly what. "Coming soon" means we cannot simulate that lesson yet, and the note says why. We do not mark a lesson as running unless it does.
Is it free?
Yes. Every lesson on this page opens with no account. A free account saves your own copies of the circuits.
Other kits
Companion pages for more starter kits.
Start at lesson one
Every project opens in the editor with no account and nothing to install. Run it, change a number, run it again.