Search found 6 matches

by sam_python
Thu May 14, 2026 8:00 am
Forum: MicroPython
Topic: Pi Pico W as MQTT client, full asyncio code that works
Replies: 0
Views: 9158

Pi Pico W as MQTT client, full asyncio code that works

<r>Building a sensor node that publishes BME280 readings to a Mosquitto broker. asyncio + umqtt.simple combo works but had some sharp edges. Sharing for the next person.<br/>

<CODE><s>[code]</s>import uasyncio as asyncio
from machine import Pin, I2C
from umqtt.simple import MQTTClient
import ...
by sam_python
Tue May 12, 2026 5:02 am
Forum: MicroPython
Topic: MicroPython async/await on Pico, sensor logger example
Replies: 0
Views: 4148

MicroPython async/await on Pico, sensor logger example

<r>After yung shock ng REPL discovery (other thread), I went down the MicroPython rabbit hole. asyncio works on Pico, and once you wrap your head around it, much cleaner than blocking sleep() loops.<br/>
<br/>
Quick example I wrote, logs a DHT22 every 30 seconds AND blinks an LED every 500ms, in ...
by sam_python
Tue May 05, 2026 11:44 am
Forum: MicroPython
Topic: REPL on MicroPython — was this always possible??
Replies: 1
Views: 973

REPL on MicroPython — was this always possible??

<t>Mga 1 hour lang ako on the Pico W with Thonny. Connected via USB, opened the REPL, started typing Python directly into the running microcontroller. Read a sensor in real-time. No compile-upload cycle.<br/>
<br/>
Software dev ako, sanay ako sa "save file, run python script, see result" loop. To be ...
by sam_python
Tue May 05, 2026 11:44 am
Forum: Raspberry Pi Pico
Topic: First Pi Pico — coming from Arduino, ano ang catch?
Replies: 0
Views: 5142

First Pi Pico — coming from Arduino, ano ang catch?

<r>Just got my first Pi Pico (regular, not the W variant). Coming from a few years of Arduino Uno/Nano work. So far impressed: cheaper than a Nano, faster, more memory.<br/>
<br/>
Pero sigurado may catch right? May mga things kasi Arduino made easy that Pico does differently, at what point will I ...
by sam_python
Tue May 05, 2026 11:43 am
Forum: Introduce Yourself
Topic: Hi, Sam here
Replies: 0
Views: 370

Hi, Sam here

<t>Background ko software (mostly Python web stuff for the past 8 years). Just started getting into hardware via the Pi Pico. Yung 'I know code but not solder' type ako, hopefully not annoying for the long-time hardware folks. May tanong na ako about MicroPython REPL, see other thread kung curious ...
by sam_python
Tue May 05, 2026 11:07 am
Forum: Arduino IDE & C++
Topic: PWM frequency tweak on Arduino Uno for sumo bot — register hacking?
Replies: 2
Views: 1851

Re: Increasing PWM frequency on Arduino Uno for sumo bot — anyone done direct register manipulation?

<r>Sa C++/AVR register side, kabisado ni Tito. From the other side, kung gusto mong tuluyang umalis sa AVR timer Tetris, yung <B><s>[b]</s>Pi Pico's PIO<e>[/b]</e></B> (Programmable I/O) lets you write hardware-level PWM at any frequency you want, walang timer manipulation kelangan.<br/>
<br/>
Para ...