Assignment items

Group assignment

Individual assignment




Fab Academy Rubric — Have you?
The criteria evaluators look for this week.





Tools

The process

This week is exciting and an area I wanted to learn more about in detail. I usually used microcontrollers for educational use — ones already built to make robotics and coding easy for K-12 children, who are our main stakeholders in the robotics education domain.

Microcontroller Comparison:


I am very new in this, so I asked FabGPT to help me in comparing between the list provided and the selection process

HTTP link

01 | I asked for help to compare and select a few to compare

Personal Access Token

02| Asked for table with basic comparison before opening the data sheets

MCU CPU / Class Clock Memory (on-chip) Big “why”
AVR128DB32 8-bit AVR 24 MHz 128KB Flash, 16KB SRAM Best practical 8-bit mixed-signal + 5V friendliness
RP2040 Dual-core Cortex-M0+ up to 133 MHz 264KB SRAM Best for timing + learning 32-bit MCU structure
ESP32-C3 RISC-V + Wi-Fi/BLE up to 160 MHz ~400KB SRAM (family) Best entry to IoT + wireless MCU datasheets
ESP32-C6 RISC-V + Wi-Fi 6/BLE/802.15.4 up to 160 MHz 512KB SRAM (noted by vendor) Best for modern multiprotocol (Thread/Zigbee)
I agree
  • Feedback: I was interested to learn more about Raspberry Pi and ESP


Task 01: RP2040


New file in Photoshop

01 | I opened the datasheet from this link

Tools used for drawing

02| One main piece of information I saw: "Code may be executed directly from external memory" / "Debug is available via the SWD interface"

raster image zoom in

03| This diagram shows the pins available for connecting the other elements and devices

raster image zoom in

04| This sentence is in English but I did not understand what it means: "The four bus masters can access any four different crossbar ports simultaneously, the bus fabric does not add wait states to any AHB-Lite slave access."

raster image zoom in

05| I looked on YouTube for a simple explanation and found this video

raster image zoom in

06| As I have limited time to allocate to this task, I searched for some explanation videos to make sure I understand the main concepts and that I'm ready for the next assignment from this link

raster image zoom in

07| I also shared the datasheet with FabGPT to create a one-pager highlighting important information for a user with no experience

raster image zoom in

08| Functional diagram

raster image zoom in

09| and I asked to reference pages and section from the datasheet against each important information

raster image zoom in

10| I looked in to Power Supply Schemes, Im still not sure how will this effect my desecion building the circuit

raster image zoom in

11| I looked into the different kinds of memories and tried to understand the differences

raster image zoom in

12| Processor Controlled Boot Sequence

raster image zoom in

13| Logic and structure of the GPIO

raster image zoom in

14| I found this block diagram, and the explanation on page 443 was a good summary of everything I read in this datasheet

I liked RP2040
  • Feedback: I learned a lot and I think RP2040 would be a good choice for a more complicated project than the shoulder-guided posture fixture
  • Challenge: It was not easy to understand the datasheet because I did not know many of the concepts and references mentioned

Programing Microcontroller:


Option 01: Building simple circuit


HTTP link

01 | I will be using the ESP32-C3 SuperMini for this task, as we have more pieces of this in our lab, and for my project I will need two microprocessors communicating

HTTP link

02 | It is small and I have enough GPIOs for my project

HTTP link

03 | I used AI Gemini to learn more about the microcontroller

HTTP link

04 | I read the ESP32-C3 SuperMini datasheet to get more details

A dedicated token

05| I connected the microcontroller to a breadboard and made sure I do not connect two pins on the same pin line to avoid short circuits. I also added a 4-leg button

Token scope should be API

06| Then I added a LED light bulb and a 10K resistor.

Token scope should be API

07| Then I used wire jumpers to connect my circuit.
Pin7 → LED → Resistor → GND
Pin9 → Button → GND. And as I'm documenting, I realized a huge mistake — the resistor should be connected before the LED, not after

Token scope should be API

08| Then I connected the MC to the computer to start programming

Token scope should be API

09| I used this code from a previous project in Arduino and downloaded the program to the MC

Token scope should be API

10| When pressing the button, the LED lights ON.

Not bad at all
  • Feedback: This was a simple circuit created fast to fulfill this assignment.
  • Challenge: I misconnected the resistor and LED and came to know about the mistake while I was documenting. This showed the value of documentation in re-evaluating projects, as well as the importance of rechecking connections. Misplacing a resistor may result in damaging some parts.

Option 02: MicroPython


Token scope should be API

01| My first attempt was with ESP IDE — it includes a block-based coding view and a Python interface with USB and Bluetooth pairing

Token scope should be API

02| I tried to connect the ESP32-C3 XIAO to it, but the device wouldn't pair. I tried to troubleshoot with Gemini AI but couldn't get it working.

Token scope should be API

03| I moved to a second IDE, VIPER — I also tried to connect my ESP32-C3 XIAO but had difficulties.

Token scope should be API

04| Then I tried Thonny — I first downloaded the desktop app.

Token scope should be API

05| Setting up Thonny for the ESP32-C3 and making sure it was selecting the correct port.

Token scope should be API

06| I found that I needed to flash the MicroPython firmware onto the microcontroller before sending any code.

Token scope should be API

07| The interpreter also has to be switched over to MicroPython. the values used with GPIO was 0, for LED on and 1 for LED off becuase the LED used was a common Anode LED.

Token scope should be API

08| I tried a simple LED-blink sketch and it worked — this became the toolchain I used through the rest of Fab Academy and the final project.


# LED light blinking 

from machine import Pin
import time

# Replace 'X' with the GPIO number from your PCB design
led = Pin(X, Pin.OUT)

while True:
    led.value(0)  # Logic 0 = LED ON (Common Anode)
    print("LED is ON")
    time.sleep(0.5)
    
    led.value(1)  # Logic 1 = LED OFF
    print("LED is OFF")
    time.sleep(0.5)
					

08| This is a video of the code used on PCB connected via USB type C cable to Thonny when uploading the same code to the microcontroller.

Got there in the end
  • Feedback: The online IDEs (ESP IDE, VIPER) wouldn't reliably pair with the XIAO over USB — a local toolchain (Thonny) ended up far more dependable. MicroPython is faster to read and iterate on; C++ feels more disciplined and may suit larger projects, but for a wearable prototype the REPL loop won.
  • Challenge: Not a lot of time to pick up a new language, so I committed to MicroPython on Thonny and built fluency week by week — paying off in Week 09 — Input Devices (MPU6050 I²C) and Week 10 — Output Devices (RGB LED + vibration motor).

Reflection

What worked
  • Using FabGPT to build a comparison table made choosing between the AVR, RP2040, and ESP32 families much faster.
  • Building a simple LED + button circuit on a breadboard was a low-stakes way to get the ESP32-C3 programmed and running.
  • Documenting as I went caught a real wiring mistake — the resistor was on the wrong side of the LED.
  • Falling back from web IDEs (ESP IDE, VIPER) to a local toolchain (Thonny + MicroPython) unblocked the board and stuck as my workflow for the rest of the academy.
What didn't
  • The datasheet was hard to follow — a lot of terms and references I didn't know yet.
  • I misconnected the resistor and LED and only caught it while writing up the steps.
  • ESP IDE and VIPER wouldn't pair with the XIAO reliably; Gemini-assisted troubleshooting didn't recover them.
  • I had to flash MicroPython firmware separately before any code would run — not obvious from the IDE setup screens.
What I'd do differently
  • Sketch the circuit on paper and check component order before wiring the breadboard.
  • Read the datasheet with a glossary open, instead of trying to parse every term cold.
  • Start with a local toolchain (Thonny) instead of burning time on web IDEs that don't recognise the board.
  • Flash the MicroPython firmware as step 1, before opening a file — would have saved an hour of confusion.
Key learnings
  • The ESP32-C3 SuperMini fits my final project — small, enough GPIO, BLE built in — and carried through Week 09 — Input Devices and Week 10 — Output Devices.
  • Component order matters: a resistor before vs. after the LED is not the same circuit.
  • Documentation isn't just recording — the act of writing it up exposes mistakes.
  • MicroPython on Thonny became my default toolchain; the LED-blink test from this week is the same scaffold I extended for the RGB LED driver and the BLE-controlled vibration in the final project.