Posts

Showing posts from September, 2024

Tutorial: Using Raspberry Pi Pico and HW-488 Infrared Obstacle Avoidance Sensor to Play/Pause a Video on Your PC via USB

Image
  In this tutorial, we'll demonstrate how to use the Raspberry Pi Pico and an HW-488 Infrared Obstacle Avoidance Sensor to control video playback on your PC. The setup will allow you to automatically play or pause a video based on your proximity to the sensor. When you are in front of the sensor, the video will play; when you step away, the video will pause. We'll use CircuitPython to achieve this, as it has built-in support for USB Human Interface Devices (HID), allowing the Pico to act like a USB keyboard. Prerequisites Hardware: Raspberry Pi Pico HW-488 Infrared Obstacle Avoidance Sensor Jumper wires USB cable for Pico connection to the PC Software: CircuitPython firmware for Raspberry Pi Pico Adafruit HID Library for CircuitPython Step 1: Setup CircuitPython on Raspberry Pi Pico To begin, we need to install CircuitPython on the Raspberry Pi Pico. Installing CircuitPython: Visit the CircuitPython download page . Download the latest .uf2 file for Raspberry Pi Pico. Hold ...

Building a WiFi-Connected (ThingSpeak) Temperature and Humidity Monitor with Raspberry Pi Pico W and DHT11

Image
 In this tutorial, we'll build a simple WiFi-enabled temperature and humidity monitor using the Raspberry Pi Pico W and a DHT11 sensor . We'll use Python-based MicroPython to program the Pico and send sensor data to ThingSpeak , a cloud platform that provides easy data logging and visualization. What You’ll Need: Raspberry Pi Pico W (with MicroPython firmware installed) DHT11 Temperature & Humidity Sensor Jumper wires for connections WiFi network credentials ThingSpeak account (to obtain your API key) Steps: 1. Setup Your Raspberry Pi Pico W First, make sure you have MicroPython installed on your Pico W. If not, follow these simple steps: Download and install Thonny IDE . Select the correct board ( Raspberry Pi Pico ) and install MicroPython firmware using Tools > Options > Interpreter . Write and save your MicroPython code using Thonny, directly onto your Pico. 2. Connect the DHT11 Sensor to Raspberry Pi Pico W We'll connect the DHT11 sensor to the Pico W...