Remote monitoring, sensor data collection, and automation
Remote monitoring, sensor data collection, and automation
Control systems, motor control, and sensor integration
Industrial automation, medical devices, and consumer products
Rapid development and testing of new ideas and products
Key Features
Packaging and Accessories
| This pack of 50 units includes |
50 x Raspberry Pi Pico Microcontroller Boards
No additional accessories or cables are included.
Documentation and Resources
| Raspberry Pi provides extensive documentation, including |
Detailed datasheets and technical specifications
Programming guides and tutorials for C, C++, and MicroPython
Schematics and hardware design files
Community forums and support resources
Ordering Information
RP-PICO-50PK
Warranty and Support
Raspberry Pi offers a limited warranty and dedicated support resources for the Pico microcontroller board. For more information, please visit the Raspberry Pi website.
Raspberry Pi Pico Microcontroller BoardOverviewThe Raspberry Pi Pico Microcontroller Board is a low-cost, high-performance microcontroller board based on the RP2040 microcontroller chip. It is designed for IoT and embedded systems development, offering a range of features and peripherals. This documentation provides an overview of the board's specifications, pinouts, and code examples to get you started.SpecificationsMicrocontroller: RP2040 dual-core Cortex-M0+ processor
Frequency: Up to 133 MHz
Memory: 264KB SRAM, 2MB Flash
Peripherals: 2x SPI, 2x I2C, 2x UART, 16x PWM, 30x GPIO
Power: USB-C for programming and power, 3.3V regulator
Dimensions: 21 x 51 mmPinoutsThe Raspberry Pi Pico Microcontroller Board has a total of 40 pins, including:30x GPIO pins
2x SPI pins
2x I2C pins
2x UART pins
16x PWM pins
3.3V power pin
GND pin
USB-C connector for programming and powerCode Examples### Example 1: Blinking an LED using GPIOThis example demonstrates how to use the GPIO pins to control an LED. In this case, we'll be using pin 25 as an output to control an external LED.C Code:
```c
#include <RP2040.h>int main() {
// Initialize GPIO pin 25 as an output
gpio_init(25);
gpio_set_dir(25, GPIO_OUT);while (1) {
// Set pin 25 high to turn on the LED
gpio_put(25, 1);
sleep_ms(500);// Set pin 25 low to turn off the LED
gpio_put(25, 0);
sleep_ms(500);
}
return 0;
}
```
MicroPython Code:
```python
import machine
import utime# Initialize pin 25 as an output
pin = machine.Pin(25, machine.Pin.OUT)while True:
# Set pin 25 high to turn on the LED
pin.value(1)
utime.sleep(0.5)# Set pin 25 low to turn off the LED
pin.value(0)
utime.sleep(0.5)
```
### Example 2: Reading Data from an I2C SensorThis example demonstrates how to use the I2C interface to read data from an external sensor, such as a temperature sensor.C Code:
```c
#include <RP2040.h>
#include <i2c.h>int main() {
// Initialize I2C interface
i2c_init(i2c0, 400000);// Set up I2C slave device (temperature sensor)
uint8_t slave_addr = 0x1A;
uint8_t reg_addr = 0x00;
uint8_t data[2];while (1) {
// Read data from I2C slave device
i2c_writerepeat(i2c0, slave_addr, ®_addr, 1, data, 2);// Print temperature data
printf("Temperature: %d.%dC
", data[0], data[1]);// Delay for 1 second
sleep_ms(1000);
}
return 0;
}
```
MicroPython Code:
```python
import machine
import ustruct# Initialize I2C interface
i2c = machine.I2C(0, freq=400000)# Set up I2C slave device (temperature sensor)
slave_addr = 0x1A
reg_addr = 0x00while True:
# Read data from I2C slave device
data = i2c.readfrom(slave_addr, reg_addr, 2)# Unpack data
temp = ustruct.unpack('<H', data)[0]# Print temperature data
print(f"Temperature: {temp/10:.1f}C")# Delay for 1 second
utime.sleep(1)
```
These code examples demonstrate the basics of using the Raspberry Pi Pico Microcontroller Board with C and MicroPython. You can further explore the board's capabilities by experimenting with different peripherals and interfaces.