I am using Raspberry Pi Pico with your libraries. When I try to put the examples together, it stucks exactly at "data = self._sm.get()" line which is under dht.measure(). Do you know why and is there any solution?
You can see my code below and I am using NeoPixel on GP6, DHT11 on GP11.
import time
from dht import DHT11
from ws2812_driver import NeoPixel
RED = (255, 0, 0)
YELLOW = (255, 150, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
COLORS = (RED, YELLOW, GREEN, CYAN, BLUE, PURPLE, WHITE, BLACK)
dht_sensor = DHT11(11)
neo = NeoPixel(6, n=1, brightness=0.3, autowrite=False)
while True:
# fill
for color in COLORS:
neo.fill(color)
neo.show()
time.sleep(0.25)
# chase
for color in COLORS:
for i in range(neo.n):
neo[i] = color
neo.show()
time.sleep(0.025)
# rainbow
for i in range(255):
neo.rainbow_cycle(i)
neo.show()
time.sleep(0.0025)
print('Here2')
# rotate
for _ in range(neo.n * 3):
neo.rotate(clockwise=True)
neo.show()
time.sleep(0.05)
print('Here3')
neo.clear()
neo.show()
print('Here4')
dht_sensor.measure()
print('Humidity = {}%, temperature = {}C, checksum passed = {}'.format(
dht_sensor.humidity(),
dht_sensor.temperature(),
dht_sensor.successful()
))
time.sleep(2)