Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8609

MicroPython • How to import a library for raspberry pi pico w

$
0
0
I got a raspberry pi pico w with me, I've found a library in github and put it in the folder in raspberry pi. However, when I use the import command, the file cannot be found?
Did I do something wrong with it?
https://i.imgur.com/i5xCxXS_d.png?maxwi ... elity=high
here's the code from main.py:
import time, machine
import aht

# Example SCL pin and SDA pin for WEMOS D1 mini Lite
i2c = machine.I2C(scl=machine.Pin(5), sda=machine.Pin(4))
sensor = aht.AHT2x(i2c, crc=True)

# To print one of measures:
if sensor.is_ready:
print("Humidity: {:.2f}".format(sensor.humidity))
print("Temperature: {:.2f}".format(sensor.temperature))

Statistics: Posted by newtorasp123 — Tue Feb 10, 2026 12:52 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles