Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!
Sylwester BalaPiotr Lewandowski
Published © GPL3+

How to connect RPi Pico to WiFi and send phone notifications

We show how to connect Pico to WiFi while maintaining low power and running it directly on AAA batteries.

BeginnerFull instructions provided2 hours14,010
How to connect RPi Pico to WiFi and send phone notifications

Things used in this project

Hardware components

IOT Cricket Wi-Fi module
Things On Edge IOT Cricket Wi-Fi module
×1
Raspberry Pi Raspbery Pi Pico
×1
Battery Holder, AAA x 2
Battery Holder, AAA x 2
×1
Hook Clips / Crocodile Clips cables
×1

Software apps and online services

Blynk
Blynk
MQTT
MQTT

Story

Read more

Code

main.py

Python
Raspberry Pi Pico program for flashing LED every 5 minutes and sending phone notifications from Cricket Wifi module
from machine import Pin, Timer
import time

led = Pin(25, Pin.OUT)
cricket = Pin(15, Pin.OUT)
timer = Timer()

def foo(timer):
    led.value(1)
    cricket.value(1)
    time.sleep(0.8)
    led.value(0)
    cricket.value(0)

# The freq = 0.00333 represents 5 minutes interval
timer.init(freq=0.00333, mode=Timer.PERIODIC, callback=foo)

Credits

Sylwester Bala

Sylwester Bala

10 projects • 17 followers
Technologist and entrepreneur who loves solving problems!
Piotr Lewandowski

Piotr Lewandowski

8 projects • 5 followers

Comments