Raspberry Pi Pico with DHT Sensor – Code Open a new file in Thonny IDE or another MicroPython IDE of your choice and copy the following code. # Complete project details at https://RandomNerdTutorials.com/raspberry-pi-pico-dht11-dht22-micropython/ from machine import Pin from time import sl...
Learn how to program the ESP32 or ESP8266 boards with MicroPython to publish DHT11 or DHT22 sensor readings (temperature and humidity) via MQTT to any platform that supports MQTT or any MQTT client. As an example, we’ll publish sensor readings to Node-RED Dashboard....
Preparing the Arduino IDE There’s an add-on for the Arduino IDE allows you to program the ESP32 using the Arduino IDE and its programming language. Follow one of the next tutorials to prepare your Arduino IDE to work with the ESP32, if you haven’t already. Windowsinstructions – ESP32...
* Complete Project Details https://RandomNerdTutorials.com */#include"DHT.h"#include<OneWire.h>#include<DallasTemperature.h>#include<Wire.h>#include<SPI.h>#include<Adafruit_Sensor.h>#include<Adafruit_BME280.h>#include<Wire.h>#include<Adafruit_BMP085.h>#include<SD.h>// for the SD cardco...
This tutorial shows how to use the DHT11 or DHT22 temperature and humidity sensors with the ESP32 and ESP8266 development boards using MicroPython firmware.
1. DHT11/DHT22 Humidity and Temperature Sensor These DHTXX sensors are very popular among the Arduino Tinkerers. The DHT sensors are relative cheap sensors for measuring temperature and humidity[click to continue reading…] 2. BMP180 Barometric Sensor ...
/*** Rui Santos Complete project details at https://RandomNerdTutorials.com/esp8266-nodemcu-dc-motor-l298n-motor-driver-control-speed-direction/ ***/ // Motor A int motor1Pin1 = 12; int motor1Pin2 = 14; int enable1Pin = 13; // Setting minimum duty cycle int dutyCycle = 60; ...
/* Arduino with PIR motion sensor For complete project details, visit: http://RandomNerdTutorials.com/pirsensor Modified by Rui Santos based on PIR sensor by Limor Fried */ int led = 13; // the pin that the LED is atteched to int sensor = 2; // the pin that the sensor is attec...
# Rui Santos & Sara Santos - Random Nerd Tutorials # Complete project details at https://RandomNerdTutorials.com/raspberry-pi-pico-w-mqtt-micropython/ from machine import Pin, I2C from time import sleep import network from umqtt.simple import MQTTClient import config import BME280 # Constants ...