Atal Tinkering Lab Package 1 (P1) - Electronics Development, Robotics, Internet of Things, and Sensors
The Atal Tinkering Lab Package 1 (P1) is a comprehensive kit designed for students and enthusiasts to explore the world of electronics development, robotics, Internet of Things (IoT), and sensors. This package includes a range of components and modules, allowing users to build and program innovative projects.
Microcontroller Board (e.g., Arduino Uno or equivalent)
Breadboard and Jumper Wires
LEDs, Resistors, and Capacitors
Sensors (Light, Temperature, Ultrasonic)
Robotics Modules (Motor Driver, DC Motors)
IoT Modules (Wi-Fi, Bluetooth)
Power Supply and Battery Holder
### Example 1: LED Blinking using Arduino Uno
In this example, we will demonstrate how to use the Microcontroller Board (Arduino Uno) to blink an LED on and off.
Arduino Uno Board
LED
Resistor (220)
Breadboard and Jumper Wires
Code:
```c
const int ledPin = 13; // Pin 13 for LED
void setup() {
pinMode(ledPin, OUTPUT); // Set LED pin as output
}
void loop() {
digitalWrite(ledPin, HIGH); // Turn LED on
delay(1000); // Wait for 1 second
digitalWrite(ledPin, LOW); // Turn LED off
delay(1000); // Wait for 1 second
}
```
Explanation:
We define the LED pin as digital output pin 13.
In the `setup()` function, we set the LED pin as an output using `pinMode()`.
In the `loop()` function, we use `digitalWrite()` to turn the LED on and off with a 1-second delay between each state.
### Example 2: Temperature Sensor using DS18B20
In this example, we will demonstrate how to use the Temperature Sensor (DS18B20) to read temperature values.
DS18B20 Temperature Sensor
Breadboard and Jumper Wires
Microcontroller Board (Arduino Uno)
Code:
```c
#include <DS18B20.h>
DS18B20 ds18b20(2); // Pin 2 for DS18B20
void setup() {
Serial.begin(9600);
}
void loop() {
int tempC = ds18b20.getTemperature();
Serial.print("Temperature: ");
Serial.print(tempC);
Serial.println(" C");
delay(1000);
}
```
Explanation:
We include the DS18B20 library.
We define the DS18B20 object, specifying Pin 2 as the data pin.
In the `setup()` function, we initialize the serial communication.
In the `loop()` function, we use the `getTemperature()` function to read the temperature value in Celsius and print it to the serial monitor.
### Example 3: Wi-Fi Connectivity using ESP8266
In this example, we will demonstrate how to use the IoT Module (ESP8266) to connect to a Wi-Fi network.
ESP8266 Wi-Fi Module
Microcontroller Board (Arduino Uno)
Breadboard and Jumper Wires
Code:
```c
#include <WiFi.h>
const char ssid = "your_wifi_ssid"; // Replace with your Wi-Fi SSID
const char password = "your_wifi_password"; // Replace with your Wi-Fi password
void setup() {
Serial.begin(9600);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to Wi-Fi...");
}
Serial.println("Connected to Wi-Fi");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// Your IoT project code here
}
```
Explanation:
We include the WiFi library.
We define the Wi-Fi SSID and password.
In the `setup()` function, we initialize the serial communication and connect to the Wi-Fi network using `WiFi.begin()`.
We use a `while` loop to wait until the Wi-Fi connection is established.
Once connected, we print the IP address to the serial monitor.
In the `loop()` function, you can add your IoT project code to interact with the Wi-Fi connection.
These examples demonstrate the versatility of the Atal Tinkering Lab Package 1 (P1) and its components. By combining these modules and sensors, you can create innovative projects in electronics development, robotics, IoT, and sensors.