TA Stuff RP2
Raspberry Pi Pico
⚠️IMPORTANT⚠️
The DHT11 is a digital sensor measuring temprature and humidity. Raspberry Pi Pico W MicroPython has a builtin library for this sensor so you do not need to import an extra library when you write code to read its values. As you can see it the following image there are different pin settings for DHT11 based on the manufacturer. If you have one like in the left part you can recongized the pin by the sign beside each. GND presented usually by (-), VCC by (+), and Data Pin by (S). So please double check before connecting your sensor to the Raspberry Pi.
You can find DHT example in LNU GitHub. The connection looks like the following figure but always check your sensor pin setting first to make sure they match.
You find a sample code below which can be copied to your main.py
and test your dht11.
The MCP9700 is an analog temperature sensor that can measure temperatures between -40°C to +150°C.
MCP9700 pinout | MCP9700 Characteristics |
---|---|
To start measuring the temperature with your MCP9700, add the following code snippet to main.py
and run the program (by saving the file while development mode
is activated).