Ex-7 Embedded & IOT
Ex-7 Embedded & IOT
DATE PLATFORM
Aim :
To study and understand the features, architecture, and programming capabilities of the
Raspberry Pi Pico W microcontroller platform.
The Raspberry Pi Pico W is a compact and affordable microcontroller board developed by the
Raspberry Pi Foundation. Building upon the success of the Raspberry Pi Pico, the Pico W variant
brings wireless connectivity to the table, making it an even more versatile platform for embedded
projects. In this article, we will provide a comprehensive overview of the Raspberry Pi Pico W,
highlighting its key features and capabilities.
Features:
Raspberry Pi Pico W:
The Raspberry Pi Pico W is based on the RP2040 microcontroller, which was designed by
Raspberry Pi in-house. It combines a powerful ARM Cortex-M0+ processor with built-in Wi-Fi
connectivity, opening up a range of possibilities for IoT projects, remote monitoring, and
wireless communication. The Pico W retains the same form factor as the original Pico, making it
compatible with existing Pico accessories and add-ons.
RP2040 Microcontroller:
At the core of the Raspberry Pi Pico W is the RP2040 microcontroller. It features a dual-core
ARM Cortex-M0+ processor running at 133MHz, providing ample processing power for a wide
range of applications. The microcontroller also includes 264KB of SRAM, which is essential for
storing and manipulating data during runtime. Additionally, the RP2040 incorporates 2MB of
onboard flash memory for program storage, ensuring sufficient space for your code and
firmware.
Wireless Connectivity:
The standout feature of the Raspberry Pi Pico W is its built-in wireless connectivity. It includes
an onboard Cypress CYW43455 Wi-Fi chip, which supports dual-band (2.4GHz and 5GHz) Wi-
Fi 802.11b/g/n/ac. This allows the Pico W to seamlessly connect to wireless networks,
communicate with other devices, and access online services. The wireless capability opens up
new avenues for IoT projects, remote monitoring and control, and real-time data exchange.
Similar to the Raspberry Pi Pico, the Pico W offers a generous number of GPIO pins, providing
flexibility for interfacing with external components and peripherals. It features 26 GPIO pins, of
which 3 are analog inputs, and supports various protocols such as UART, SPI, I2C, and PWM.
The Pico W also includes onboard LED indicators and a micro-USB port for power and data
connectivity.
One of the unique features of the RP2040 microcontroller is the inclusion of Programmable
Input/Output (PIO) state machines. These state machines provide additional processing power
and flexibility for handling real-time data and timing-critical applications. The PIO state
machines can be programmed to interface with custom protocols, generate precise waveforms,
and offload tasks from the main processor, enhancing the overall performance of the system.
As with all Raspberry Pi products, the Pico W benefits from the vibrant and supportive
Raspberry Pi community. Raspberry Pi provides extensive documentation, including datasheets,
pinout diagrams, and programming guides, to assist developers in understanding the board's
capabilities. The community offers forums, online tutorials, and project repositories, allowing
users to seek help, share knowledge, and collaborate on innovative projects.
Result:
Thus, the study of the Raspberry Pi Pico W microcontroller platform was completed, and the key
features, wireless capabilities, GPIO options, and programming methods were successfully
understood.
EXP NO:7B LED BLINK
DATE
Aim :
To Write a program for blink an LED connected to a microcontroller using Python
programming with the machine and utime modules.
Algorithm :
Step 1: Start
Step 2: Import the pin class from the machine module and the sleep function from the utime
module.
Step 3: Initialise a new pin object named led with pin number 11 and set it as an output pin.
Step 4: Enter an infinite loop.
Step 4.1: Toggle the state of the led connected to pin 11 (if it's on, turn it off, and if It's off, it on).
Step 4.2: Pause the execution for 0.5 seconds using the sleep function to create a blinking
effect.
Step 5: Stop
Program:
While true:
Led.toggle()
Sleep(0.5)
Output:
Result :
Thus, the LED blinking program was written, executed, and the LED successfully blinked as
expected.
EXP NO: 7C
DATE PUSH BUTTON AND LED
Aim :
To write a program for control an LED using a push button connected to a microcontroller by
writing a Python program with machine and time modules.
Algorithm :
Step 1 : Start
Step 2 : Initialize LED connected to pin 15 and set it as an output.
Step 3 : Initialise the push button connected to pin 16 and set it as an input.
Step 4 : If the button is pressed (HIGH),then turn the LED on.
Step 5 : Wait for a short duration (0.1 seconds).
Step 6 : Otherwise,turn the LED off.
Step 7 : Stop
Program:
Result :
Thus, the push button and LED control program was written, executed, and the LED responded
to the button press successfully.
EXP NO:7D
DATE MULTIPLE LEDs BLINK
Aim :
To Write a program for blink multiple LEDs connected to GPIO pins of a microcontroller
simultaneously using Python programming with machine and time modules.
Algorithm :
Step 1 : Start
Step 2 : Import the Pin class from the machine module and the sleep function
from the time module.
Step 3 : Define four LED objects (LED1, LED2, LED3, LED4) each connected to
GPIO pins 6, 7, 8, and 9 respectively, all set as output pins.
Step 4 : Turn all LEDs on simultaneously.
Step 5 : Wait for 1 second.
Step 6 : Turn all LEDs off simultaneously.
Step 7 : Wait for 1 second.
Step 8 : Stop.
Program:
Output:
Result :
Thus, the program for blinking multiple LEDs was written, executed, and the LEDs blinked
simultaneously as intended.