0% found this document useful (0 votes)
36 views

Blinking Led Lab 1

This document summarizes a lab experiment comparing Arduino and STM32 Nucleo boards. The objectives were to understand embedded systems programming, compare the programming of the two boards, and implement a blinking LED application on each. Key differences noted were the code syntax, with Arduino using functions like digitalWrite() and delay() while STM32 used HAL functions. The experiment highlighted the versatility of embedded platforms and how to select the appropriate board based on requirements.

Uploaded by

crystal mcintosh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Blinking Led Lab 1

This document summarizes a lab experiment comparing Arduino and STM32 Nucleo boards. The objectives were to understand embedded systems programming, compare the programming of the two boards, and implement a blinking LED application on each. Key differences noted were the code syntax, with Arduino using functions like digitalWrite() and delay() while STM32 used HAL functions. The experiment highlighted the versatility of embedded platforms and how to select the appropriate board based on requirements.

Uploaded by

crystal mcintosh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Physics/Engineering Benedict College

CE 332 01 – EMBEDDED SYSTEM


Lab 1: Blinking LED with Arduino and STM32
Nucleo Boards

Student : Crystal McIntosh


Date : February 27, 2024
Professor Gottapu
ABSTRACT:
The lab aimed to compare the programming methodologies and functionalities of Arduino and STM32
Nucleo boards in implementing a simple blinking LED application. By writing code for both boards and
observing the behavior of the LEDs, the experiment provided insights into embedded systems
programming. Through hands-on exploration, participants gained a deeper understanding of the
differences between Arduino and STM32 platforms and their applications in embedded systems
development.

INTRODUCTION:
Embedded systems play a vital role in various technological applications, requiring efficient
programming and hardware integration. This lab experiment focuses on implementing a basic blinking
LED application on Arduino and STM32 Nucleo boards. By comparing the programming syntax,
libraries, and functionalities of both platforms, participants gain practical experience in embedded
systems development.

OBJECTIVES:
o Understand the basic concepts of embedded systems programming.
o Compare the programming methodologies of Arduino and STM32 Nucleo boards.
o Implement a simple blinking LED application on both platforms.
o Analyze the differences in code syntax and execution between Arduino and STM32
platforms.

APPARATUS:
o Arduino board (e.g., Arduino Uno)
o STM32 Nucleo board (e.g., Nucleo-F303RE)
o LEDs
o Jumper wires
o Breadboard

PROCEDURE:
o Connect the Arduino board to the computer using a USB cable.
o Write the code for the blinking LED application using the Arduino IDE.
o Upload the code to the Arduino board and observe the LED behavior.
o Disconnect the Arduino board and connect the STM32 Nucleo board to the computer.
o Write the code for the blinking LED application using STM32CubeIDE.
o Compile the code and flash it onto the STM32 Nucleo board.
o Observe the LED behavior and compare it with the Arduino board.
RESULTS:

The code configures pin 12 as an output pin and creates a blinking effect by toggling the LED state with
specific delays.

The code toggles the state of the built-in LED (LD2) on the STM32 Nucleo board using the HAL GPIO
Toggle function with a delay of 1000 milliseconds.

The blinking LED application was successfully implemented on both Arduino and STM32
Nucleo boards. While the basic functionality remained the same, there were differences in code
syntax and library usage between the two platforms. The Arduino code utilized functions such as
digitalWrite() and delay(), whereas the STM32 code employed HAL (Hardware Abstraction
Layer) functions like HAL_GPIO_TogglePin() and HAL_Delay().
DISCUSSION AND ANALYSIS:

The experiment highlighted the versatility of embedded systems programming and the
importance of selecting the appropriate platform based on project requirements. Arduino boards
offer simplicity and ease of use, making them ideal for beginners and rapid prototyping. On the
other hand, STM32 Nucleo boards provide advanced features and performance, suitable for
complex projects requiring real-time processing and high-speed communication.

CONCLUSION:
In conclusion, the lab experiment provided valuable insights into embedded systems
programming using Arduino and STM32 Nucleo boards. By implementing a basic blinking LED
application, participants gained practical experience in writing code and understanding the
differences between Arduino and STM32 platforms. Moving forward, further exploration and
experimentation with advanced features and peripherals of both boards can deepen
understanding and enhance skills in embedded systems development.

You might also like