Abstract
Arduino Temperature Control Library is an open-source Internet of Things (IoT) project. Arduino library for interfacing with Maxim temperature sensors. A robust and feature-complete Arduino library for Maxim Temperature Integrated Circuits. It is built using C++, Arduino, ESP8266. Key capabilities include: Multiple sensors on the same bus; Temperature conversion by address (getTempC(address) and getTempF(address)); Asynchronous mode (added in v3.7.0). The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building an Internet of Things (IoT) mini project or final-year project.
1. Introduction
A robust and feature-complete Arduino library for Maxim Temperature Integrated Circuits.
2. Objective
Arduino library for interfacing with Maxim temperature sensors
This project demonstrates how C++, Arduino, ESP8266 can be applied to a real-world Internet of Things (IoT) problem.
3. Key Features / Modules
- Multiple sensors on the same bus
- Temperature conversion by address (getTempC(address) and getTempF(address))
- Asynchronous mode (added in v3.7.0)
- Configurable resolution
4. Technology Stack
- Open Arduino IDE
- Go to Tools > Manage Libraries...
- Search for "DallasTemperature"
- Click Install
- Also install the required "OneWire" library by Paul Stoffregen using the same method
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Arduino IDE / PlatformIO or a C++ compiler (g++)
- Target board (e.g. Arduino, ESP32) where applicable
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/milesburton/Arduino-Temperature-Control-Library.git
cd Arduino-Temperature-Control-Library- Download the latest release from GitHub releases
- In Arduino IDE, go to Sketch > Include Library > Add .ZIP Library...
- Select the downloaded ZIP file
- Repeat steps 1-3 for the required "OneWire" library
- Hardware Setup
- Connect a 4k7 Ω pull-up resistor between the 1-Wire data line and 5V power. Note this applies to the Arduino platform, for ESP32 and 8266 you'll need to adjust the resistor value accordingly.
- For DS18B20: Ground pins 1 and 3 (the centre pin is the data line)
- For reliable readings, see pull-up requirements in the DS18B20 datasheet (page 7)
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is connected to GPIO 4
#define ONE_WIRE_BUS 4
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup(void) {
Serial.begin(9600);
sensors.begin();
}
void loop(void) {
sensors.requestTemperatures();
delay(750);
float tempC = sensors.getTempCByIndex(0);
Serial.print("Temperature: ");
Serial.print(tempC);
Serial.println("°C");
delay(1000);
}Full setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Add a mobile dashboard using Blynk or Firebase
- Store readings in a cloud database for history charts
- Add alerts via SMS / Telegram when thresholds are crossed
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- Which microcontroller / board and sensors are used and why?
- How does the device send data (Wi-Fi, MQTT, HTTP, Bluetooth)?
- Where is the sensor data stored and visualised?
- How is power consumption managed?
- How would you secure the device and its communication?
9. Source Code & License
This project is developed by milesburton and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on an Internet of Things (IoT) project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Internet of Things (IoT) Internship