Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Connect Raspberry Pi 3 to DHT11 Sensor and Upload Data to ThingsIo.ai Cloud

The goal of this tutorial is to guide you through capturing temperature and humidity data with a DHT11 sensor on a Raspberry Pi 3 and sending it to the ThingsIo.ai cloud platform for storage and visualization.

Overview

This step‑by‑step guide covers hardware setup, Raspberry Pi configuration, ThingsIo.ai account creation, code deployment, and data visualization. Whether you’re a hobbyist or a professional IoT developer, the instructions are clear, concise, and based on proven best practices.

Hardware Requirements

Software and Tools

Part I: Raspberry Pi Setup

  1. Format the SD card using the SD card formatter and flash the Raspbian image with Win32 Disk Imager.
  2. Create an empty file named ssh (no extension) on the boot partition to enable SSH.
  3. Create wpa_supplicant.conf with your Wi‑Fi credentials:
  4. country=US
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
        ssid="YOUR_SSID"
        psk="YOUR_PASSWORD"
    }
    
  5. Insert the SD card, power on the Pi, and locate its IP address using Advanced IP Scanner (168.0.1‑254 or 192.168.137.1‑254).
  6. SSH into the Pi with Putty: username pi, password raspberry.
  7. Enable SSH and install VNC:
  8. sudo raspi-config
    # Navigate to Interface Options → SSH → Enable
    sudo apt-get update && sudo apt-get install tightvncserver
    
  9. Start the VNC server and connect via VNC Viewer from your Windows machine.

Part II: ThingsIo.ai Cloud Setup

  1. Register at ThingsIo.ai and verify your email.
  2. Log in to your dashboard and create a new project.
  3. Within the project, add a new device to obtain a Device ID.
  4. Navigate to Sample Device Code → Raspberry Pi to copy the provided Python script.
  5. Upload the script to the Pi (e.g., device.py) and run it to send a trial data packet.

Part III: Wiring and Code Configuration

  1. Install WiringPi on the Pi:
  2. sudo apt-get update
    sudo apt-get install git-core
    git clone git://git.drogon.net/wiringPi
    
  3. Open the script in your preferred editor (Geany, Nano, etc.). Ensure the GPIO pin assignment matches your DHT11 connection.
  4. Modify the code to reference your Device ID and ThingsIo.ai endpoint.
  5. Run the script and confirm data appears in the ThingsIo.ai dashboard.

Part IV: Visualizing Data on ThingsIo.ai

With this setup, your Raspberry Pi continuously streams temperature and humidity data to the ThingsIo.ai cloud, where you can analyze trends, set alerts, and integrate with other services.

Further Resources

For deeper exploration, consult the official Raspberry Pi documentation, DHT11 datasheet, and ThingsIo.ai developer guides.

Manufacturing process

  1. Build a Raspberry Pi Temperature Logger with a $5 I2C Sensor
  2. Build a Raspberry Pi Weather Station that Emails Daily Weather Data
  3. Beginner IoT Tutorial: Streaming Temperature Data from a Raspberry Pi
  4. Connecting HC‑SR04 Ultrasonic Sensor to Raspberry Pi 3 – A Complete Guide
  5. Control an LED with a PIR Motion Sensor on Raspberry Pi
  6. Build a Low‑Cost Raspberry Pi Soil Moisture Sensor for Smart Irrigation
  7. Build Your First IoT Project with Raspberry Pi, DHT11, and ThingSpeak
  8. Build a Raspberry Pi Home Temperature Monitor with MCP9808, InfluxDB & Grafana
  9. Send Adafruit 10DOF IMU Data from Raspberry Pi 2 to Azure Event Hubs with Windows 10 IoT Core
  10. Build a Windows IoT Core Rover with Raspberry Pi 2 – Beginner to Advanced Guide