Harsh Patil
Harsh Patil
EXPERIMENT NO: 1
Procedure:
1. Follow the examples in the Arduino compiler and edit them as logically required.
2. Use Wokwi Open ware simulator using internet for different set of hardware interfacing and
paste the Arduino example programme in the sketch mode of Wokwi and save. One can refer the
internet to explore different solution and execute the programs available on internet library.
3. Simulate the required program and virtually test the connections w.r.t. the programme coded.
4. Then connect the physical wires (through bread board) as designed on Wokwi with the Arduino
board and after checking and confirming the connection connect to the PC CPU for power
supply and communication between the software and hardware chip for physically executing the
program and field elements.
5. Edit the program code with added features for better functionality.
Page 1 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
Types of Wires:
USB communicating and power cable, Male to Male, Male to female and Female to Female wires.
Page 2 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
EXPERIMENT NO: 2
Photo:
Procedure:
1. Follow the examples in the Arduino compiler and edit them as logically required.
2. Use Wokwi Open ware simulator using internet for different set of hardware interfacing and
paste the Arduino example programme in the sketch mode of Wokwi and save. One can refer the
internet to explore different solution and execute the programs available on internet library.
3. Simulate the required program and virtually test the connections w.r.t. the programme coded.
4. Then connect the physical wires (through bread board) as designed on Wokwi with the Arduino
board and after checking and confirming the connection connect to the PC CPU for power
supply and communication between the software and hardware chip for physically executing the
program and field elements.
5. Edit the program code with added features for better functionality.
Program Code:
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
Page 4 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
EXPERIMENT NO: 3
Photo:
Components:
Procedure:
1. Follow the examples in the Arduino compiler and edit them as logically required.
2. Use Wokwi Open ware simulator using internet for different set of hardware interfacing and
paste the Arduino example programme in the sketch mode of Wokwi and save. One can refer the
internet to explore different solution and execute the programs available on internet library.
3. Simulate the required program and virtually test the connections w.r.t. the programme coded.
4. Then connect the physical wires (through bread board) as designed on Wokwi with the Arduino
board and after checking and confirming the connection connect to the PC CPU for power
supply and communication between the software and hardware chip for physically executing the
program and field elements.
5. Edit the program code with added features for better functionality.
Page 5 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
Program Code:
Page 6 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
EXPERIMENT NO: 4
Photo:
1. Follow the examples in the Arduino compiler and edit them as logically required.
2. Use Wokwi Open ware simulator using internet for different set of hardware interfacing and
paste the Arduino example programme in the sketch mode of Wokwi and save. One can refer the
internet to explore different solution and execute the programs available on internet library.
3. Simulate the required program and virtually test the connections w.r.t. the programme coded.
4. Then connect the physical wires (through bread board) as designed on Wokwi with the Arduino
board and after checking and confirming the connection connect to the PC CPU for power
supply and communication between the software and hardware chip for physically executing the
program and field elements.
5. Edit the program code with added features for better functionality.
Page 7 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
Program Code:
// DHT Temperature & Humidity Sensor
// Unified Sensor Library Example
// Written by Tony DiCola for Adafruit Industries
// Released under an MIT license.
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
uint32_t delayMS;
Page 8 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
void setup() {
Serial.begin(9600);
// Initialize device.
dht.begin();
Serial.println(F("DHTxx Unified Sensor Example"));
// Print temperature sensor details.
sensor_t sensor;
dht.temperature().getSensor(&sensor);
Serial.println(F("------------------------------------"));
Serial.println(F("Temperature Sensor"));
Serial.print (F("Sensor Type: ")); Serial.println(sensor.name);
Serial.print (F("Driver Ver: ")); Serial.println(sensor.version);
Serial.print (F("Unique ID: ")); Serial.println(sensor.sensor_id);
Serial.print (F("Max Value: ")); Serial.print(sensor.max_value); Serial.println(F("°C"));
Serial.print (F("Min Value: ")); Serial.print(sensor.min_value); Serial.println(F("°C"));
Serial.print (F("Resolution: ")); Serial.print(sensor.resolution); Serial.println(F("°C"));
Serial.println(F("------------------------------------"));
// Print humidity sensor details.
dht.humidity().getSensor(&sensor);
Serial.println(F("Humidity Sensor"));
Serial.print (F("Sensor Type: ")); Serial.println(sensor.name);
Serial.print (F("Driver Ver: ")); Serial.println(sensor.version);
Serial.print (F("Unique ID: ")); Serial.println(sensor.sensor_id);
Serial.print (F("Max Value: ")); Serial.print(sensor.max_value); Serial.println(F("%"));
Serial.print (F("Min Value: ")); Serial.print(sensor.min_value); Serial.println(F("%"));
Serial.print (F("Resolution: ")); Serial.print(sensor.resolution); Serial.println(F("%"));
Serial.println(F("------------------------------------"));
// Set delay between sensor readings based on sensor details.
delayMS = sensor.min_delay / 1000;
}
void loop() {
// Delay between measurements.
delay(delayMS);
// Get temperature event and print its value.
sensors_event_t event;
dht.temperature().getEvent(&event);
if (isnan(event.temperature)) {
Serial.println(F("Error reading temperature!"));
}
else {
Serial.print(F("Temperature: "));
Serial.print(event.temperature);
Serial.println(F("°C"));
}
// Get humidity event and print its value.
dht.humidity().getEvent(&event);
if (isnan(event.relative_humidity)) {
Serial.println(F("Error reading humidity!"));
}
else {
Page 9 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
Serial.print(F("Humidity: "));
Serial.print(event.relative_humidity);
Serial.println(F("%"));
}
}
Page 10 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
EXPERIMENT NO: 5
Photo:
1. Follow the examples in the Arduino compiler and edit them as logically required.
2. Use Wokwi Open ware simulator using internet for different set of hardware interfacing and
paste the Arduino example programme in the sketch mode of Wokwi and save. One can refer the
internet to explore different solution and execute the programs available on internet library.
3. Simulate the required program and virtually test the connections w.r.t. the programme coded.
4. Then connect the physical wires (through bread board) as designed on Wokwi with the Arduino
board and after checking and confirming the connection connect to the PC CPU for power
supply and communication between the software and hardware chip for physically executing the
program and field elements.
5. Edit the program code with added features for better functionality.
Page 11 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
Program Code:
/*
Button
Turns on and off a light emitting diode(LED) connected to digital pin 13,
when pressing a pushbutton attached to pin 2.
The circuit:
- LED attached from pin 13 to ground through 220 ohm resistor
- pushbutton attached to pin 2 from +5V
- 10K resistor attached to pin 2 from ground
created 2005
by DojoDave <http://www.0j0.org>
modified 30 Aug 2011
by Tom Igoe
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Button
*/
void setup() {
// initialize the LED pin as an output:
pinMode(relayPin, OUTPUT);
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
}
void loop() {
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
Page 13 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
EXPERIMENT NO: 6
Photo:
Procedure:
1. Follow the examples in the Arduino compiler and edit them as logically required.
2. Use Wokwi Open ware simulator using internet for different set of hardware interfacing and
paste the Arduino example programme in the sketch mode of Wokwi and save. One can refer the
internet to explore different solution and execute the programs available on internet library.
3. Simulate the required program and virtually test the connections w.r.t. the programme coded.
4. Then connect the physical wires (through bread board) as designed on Wokwi with the Arduino
board and after checking and confirming the connection connect to the PC CPU for power
supply and communication between the software and hardware chip for physically executing the
program and field elements.
5. Edit the program code with added features for better functionality.
Page 14 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
Program Code:
// Motor A connections
int enA = 9;
int in1 = 8;
int in2 = 7;
// Motor B connections
int enB = 3;
int in3 = 5;
int in4 = 4;
void setup() {
// Set all the motor control pins to outputs
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
Page 15 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
void loop() {
directionControl();
delay(1000);
speedControl();
delay(1000);
}
Page 17 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
EXPERIMENT NO: 7
Photo:
AIM:
Components:
Procedure:
Program Code:
Page 18 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
EXPERIMENT NO: 9
Photo:
AIM:
Components:
Procedure:
Program Code:
Page 19 of 20
110DON BOSCO INSTITUTE OF TECHNOLOGY, (DBIT), MUMBAI, 400 070
Page 20 of 20