Task: Embedded Programming
Individual Assignment:
Individual Assignment:
During this assignment, I explored programming, component interfacing, and the basics of microcontrollers. Working with the Arduino Uno and ESP32 helped me understand their features, how to program them, and how they are used in real-life applications. Since I didn’t always have physical hardware, Tinkercad simulations were very helpful in understanding circuit behavior. I also improved my troubleshooting skills through debugging techniques.
I have decided to use the Arduino Uno and ESP32 microcontroller boards for my project. To determine which board is best suited for specific tasks, I will review their specifications, capabilities, and performance.
![]() |
![]() |
![]() |
Here is a comparison sheet of the Arduino Uno and ESP32 microcontrollers:
Feature | Arduino Uno | ESP32 Dev Module (ESP32-WROOM-32) |
---|---|---|
Processor | ATmega328P (8-bit, 16MHz) | Xtensa Dual-Core LX6 (32-bit, up to 240MHz) |
Flash Memory | 32 KB | 4MB (external SPI flash) |
SRAM (RAM) | 2 KB | 520 KB internal SRAM |
GPIO Pins | 14 Digital, 6 Analog | 34+ GPIOs, multifunctional with input/output capabilities |
WiFi / Bluetooth | ❌ No | ✅ Yes (WiFi 802.11 b/g/n, Bluetooth v4.2 BR/EDR and BLE) |
Operating Voltage | 5V | 3.3V |
Power Consumption | High (No Low Power Mode) | Low Power Modes: Light Sleep, Deep Sleep |
SPI / I2C / UART | Yes (Limited ports) | Yes (Multiple SPI, I2C, UART interfaces) |
Advanced Features | No | ✅ Touch sensor, PWM, DAC, ADC (12-bit), Hall sensor, Temperature sensor, IoT support |
The Arduino Uno is a widely used microcontroller board for embedded system automation, based on the ATmega328P. It operates at 5V and can be powered via USB or an external 7–12V power supply. Key features include a 16 MHz crystal oscillator, 6 analog inputs, and 14 digital input/output pins (6 of which support PWM). It is programmed using the Arduino IDE in C/C++.
I wrote and uploaded the code using the Arduino IDE, which provides a user-friendly programming interface for microcontrollers.
Components and Sensors Used
I worked with four different components and sensors: RGB LED, servo motor, ultrasonic sensor, and LED. Implementing these projects helped me develop a deeper understanding of various aspects of Arduino programming.
![]() Step 1: Download Arduino IDE from the official website. |
![]() Step 2: Click "Just Download" to proceed without donating. |
![]() Step 3: Open Arduino IDE, where the default sketch appears. |
![]() Step 4: Select your board from Tools > Board menu. |
![]() |
![]() |
LED Blinking | |
![]() |
![]() |
2. Ultrasonic Sensor Gained knowledge of input and output pin operations. learned how to broadcast and receive echo signals using the sensor. Used the pulseIn() method to calculate distance and time duration. |
|
![]() |
![]() |
3. Servo Motor A servo motor learned how to use a servo motor to control motor angles. Gained the ability to rotate smoothly for precise motor control. |
|
![]() |
![]() |
4. RGB LED Learned how to control multiple LEDs within a single sensor. Discovered how to use programming logic to mix colors and create visual effects. |
I also learnt how to use program files, add libraries, and configure programming in the Arduino IDE with all of these projects. My knowledge of the Arduino platform and the useful applications of these components in actual projects has significantly increased as a result of this assignment.
The MicroPython Another programming language made especially to operate on microcontrollers and embedded systems is called Python. Simple communication with sensors and other components is made possible by this.. MicroPython has built-in libraries for controlling hardware, including GPIO, I2C, SPI, and PWM, and it offers an interactive mode through the REPL (Read-Eval-Print Loop). Its mobility and simplicity make it perfect for quick prototyping and teaching. When combined with devices like the ESP32, which has built-in Bluetooth and Wi-Fi,
I wrote, compiled, and uploaded code using Thonny. This software provides a user-friendly microcontroller programming interface.
Sensors and Components Used
I worked with four sensors and parts: RGB LED, servo motor, ultrasonic sensor, and LED. I developed a thorough understanding of many facets of Arduino programming by putting these projects into practice.
![]() Downloading Thonny IDE: |
![]() Launching Thonny IDE: |
![]() Installing MicroPython (ESP32) Support: |
![]() ESP32 Connected and Ready: |
![]() LED Blinking Code: |
![]() |
LED Blinking: I gained knowledge about defining pins and setting them as outputs. I learned how to use MicroPython to interact with simple digital outputs by turning the LED on and off. |
|
![]() |
![]() |
Ultrasonic Sensor: I learned how to use the ultrasonic sensor's input and output pins, how to send and receive an echo from it, and how to use the pulse time to determine distance. Additionally, I learned how to measure the time period of the sensor's echo using the |
|
![]() |
![]() |
Servo Motor: Through the servo motor project, I learned how to control the motor by adjusting its angle and using the library to adjust its position. I learned how to quickly regulate motor rotation and became familiar with the MicroPython servo library. |
|
![]() |
![]() |
RGB LED: Working with RGB LEDs taught me how to define the pins of each color and change their states in order to control many LEDs within a single component. |
I also learned how to use program files, add libraries, and build up a MicroPython programming environment through all of these tasks. I now have a much better understanding of MicroPython programming on the ESP32 thanks to this assignment.
Users can design and model electronic circuits using the online simulation program TinkerCAD. It offers a straightforward and user-friendly interface for building circuits using a variety of parts, including as motors, sensors, LEDs, and microcontrollers. TinkerCAD features drag-and-drop capability, making it easier for users to construct and test circuits in a virtual environment, so enabling testing and debugging of projects before implementing them with physical hardware. TinkerCAD offers a hands-on learning experience in electronics and circuit design, which is particularly helpful for novices.
![]() I ahve to sarch in Sarch engisan Ardiono IDF |
![]() Clik on the just dwonlodr |
![]() opne the Aridno Sftwerew | ![]() i have to slackt the bord and do and some seting of the bord inthe toolsd |
Use your Google account or email address to create an account.
Click the "Create new design" option on your dashboard after logging in. This will create a fresh workspace for you to begin circuit design and simulation.
Find "servo motor" under the "Components" menu, then drag it to the workspace. The workspace will display the servo motor. Typically, it contains three pins: signal (PWM), ground (GND), and power (VCC).
Drag the Arduino Uno board from the Components tab onto the workspace..
Attach the servo motor's VCC pin to the Arduino's 5V pin.
Connect the GND pin of the servo motor to the GND pin of the Arduino.
A PWM-capable Arduino pin, like pin 9, is connected to the servo motor's signal pin.
After adjusting the perpetual block and adjusting the servo motor's degree from 90 to 180, I ran the simulation. At last, we place the block within the block.. Additionally, the motor began to move automatically after the simulation was finished.