Shashank Iot Ml Ppt

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

IOT-ML INTERNSHIP

SHASHANK SHEKHAR
1NT21EC131
Internet of things

 IoT stands for Internet of Things. It refers to a network of physical


objects, devices, vehicles, buildings, and other items that are
embedded with sensors, software, and connectivity, enabling them
to collect and exchange data over the internet. IoT allows these
objects to be remotely monitored, controlled, and connected to
create smart environments and improve efficiency, convenience,
and decision-making across various industries and everyday life.
Application of IOT

 IoT has numerous applications across various sectors and industries. Some prominent applications
include:
 Smart Homes: IoT enables the automation and control of home
devices such as lighting, heating, security systems, and appliances
through connected devices like smartphones or voice assistants.

 Smart Cities: IoT facilitates city-wide infrastructure management,


including smart traffic management, waste management, energy
usage optimization, and public safety monitoring.
Applications of IOT

 Healthcare: IoT devices such as wearable health monitors, remote


patient monitoring systems, and smart medical devices help in
continuous health monitoring, improving patient care and efficiency
in healthcare delivery.
 Industrial IoT (IIoT): IoT is used in industries for asset tracking, predictive maintenance, remote
monitoring of machinery, and optimizing manufacturing processes through real-time data
analytics.
 Agriculture: IoT applications in agriculture include precision farming techniques such as soil
monitoring, smart irrigation systems, livestock monitoring, and crop management, leading to
increased productivity and resource efficiency.
ESP-32 BOARD

 The ESP32 board is a popular microcontroller


development platform that integrates Wi-Fi
and Bluetooth connectivity capabilities. Here
are some key features and applications of the
ESP32 board
Features:

•Dual-core Processor: The ESP32 board typically features a dual-


core Tensilica Xtensa LX6 processor, which allows for efficient
multitasking and processing of complex tasks.
•Wi-Fi Connectivity: It supports 802.11 b/g/n Wi-Fi with integrated
TCP/IP protocol stack, enabling it to connect to Wi-Fi networks and
communicate over the internet.
•Bluetooth: It includes Bluetooth Classic (Bluetooth 4.2) and
Bluetooth Low Energy (BLE) connectivity, making it suitable for
applications requiring wireless communication with Bluetooth-enabled
devices.
Features

• Low Power Consumption: The ESP32 is designed with power-saving


features, allowing it to operate in low-power modes and extend battery life
in battery-powered applications.
•Rich Peripheral Interface: It offers a wide range of peripheral interfaces
such as UART, SPI, I2C, I2S, ADC, DAC, PWM, and GPIOs, making it
versatile for interfacing with sensors, actuators, displays, and other devices.
•Integrated Security Features: It includes hardware-based security
features such as secure boot, flash encryption, and cryptographic
accelerators to ensure data integrity and secure communication.
•Development Environment: The ESP32 is supported by the Arduino IDE,
PlatformIO, and other development environments, making it easy to
program and integrate into projects.
Wokwi-online
simulator
 "Wokwi" appears to refer
to a virtual electronics
prototyping platform
designed for hobbyists,
educators, and engineers. It
allows users to simulate
and experiment with
various electronic circuits
and microcontroller
projects online, without the
need for physical
components.
Arduino Uno Software

 The Arduino Uno software, often referred to as the Arduino IDE (Integrated Development
Environment), is the primary software tool used for programming Arduino boards,
including the Arduino Uno.
 Arduino IDE Features:
1. Code Editor: The Arduino IDE provides a text editor where you can write, edit, and save
your Arduino sketches (programs). The sketches are written in C/C++ programming
language with a few specific libraries and functions provided by Arduino.
2. Integrated Compiler: It includes a compiler that translates your Arduino sketches into
machine code that the Arduino board can understand and execute. This process is
seamless within the IDE.
Arduino IDE Features:

•Upload Functionality: The IDE allows you to upload your


compiled sketches directly to the Arduino Uno board via a USB
connection. This enables you to quickly test and run your
programs on the physical hardware.
•Library Management: Arduino IDE comes with a standard set
of libraries that provide pre-written code for common tasks like
controlling LEDs, motors, sensors, etc. It also allows you to
easily add additional libraries for extended functionality.
•Serial Monitor: The IDE includes a built-in serial monitor tool
that allows you to send and receive data between your Arduino
board and the computer. This is crucial for debugging and
monitoring the behavior of your sketches.
Led_blynk control

 Controlling an LED with Blynk using an ESP32 involves a few steps: setting up the Blynk
app, programming the ESP32 using the Arduino IDE, and wiring the LED to the ESP32.
Here’s a step-by-step guide to help you get started:
 Requirements:
• Blynk account and Blynk app installed on your smartphone (available for iOS and Android).
• Arduino IDE installed on your computer.
• ESP32 development board (such as ESP32 Dev Kit).
• LED and a suitable resistor.
• USB cable for programming and power.
Code
 #include <WiFi.h>
 #include <WiFiClient.h>
 #include <BlynkSimpleEsp32.h>
 // Replace with your network credentials char
 ssid[] = "YourWiFiSSID";
 char pass[] = "YourWiFiPassword";
 char auth[] = "YourAuthToken";
 // Pin connected to the LED
 #define LED_PIN 2 // GPIO 2 on ESP32
 void setup()
 { Serial.begin(115200);
 Blynk.begin(auth, ssid, pass);
 pinMode(LED_PIN, OUTPUT);
 }
 void loop()
 {
 Blynk.run();
 } //
 Blynk virtual pin handler BLYNK_WRITE(V1)
 { int state = param.asInt(); // Get value from Blynk app digitalWrite(LED_PIN, state); // Control
LED }
Working with dht 11 sensor

 The DHT11 sensor is a basic, low-cost digital temperature


and humidity sensor. It is commonly used in various projects
and applications to measure ambient temperature and relative
humidity levels. Here are some key features and
characteristics of the DHT11 sensor:
Code to integrate dht11 sensor with 32 board with blynk cloud

 #define BLYNK_PRINT Serial


 #define BLYNK_TEMPLATE_ID "TMPL3xFzjUSV-“
 #define BLYNK_TEMPLATE_NAME "led“
 #define BLYNK_AUTH_TOKEN "RUBUDHI-AyPL-wIOwtpW9XTRoFCaQPCd"
 #include <WiFi.h> #include <WiFiClient.h> #include <BlynkSimpleEsp32.h> #include
<ESP32Servo.h> #include<DHT.h>
codes

 #define dht_pin 15
 #define dht_Type DHT11
 const int trigPin = 9; const int echoPin = 10;
 long duration;
 int distance;
 DHT dht(dht_pin, dht_Type );
 char auth[] = BLYNK_AUTH_TOKEN; // Your WiFi credentials. // Set password to "" for open
networks. char ssid[] = "vivo1819"; char pass[] = “anurag2425";
Codes

 BlynkTimer timer; #define AOUT_PIN 36 Servo servo; BLYNK_WRITE(V0) { int pinValue =


param.asInt(); // assigning incoming value from pin V1 to a variable digitalWrite(2,pinValue);
 int flag=0;

 void sendSensor()
 { Blynk.virtualWrite(V3,distance); float temp= dht.readTemperature(); float hum=
dht.readHumidity(); if (temp> 32 && flag == 0) { Serial.println("Temperature rised above 32 C");
Blynk.logEvent("temp_alert", String("High Temperature Detected! Tº: ") + temp); flag = 1; // Set
the flag to indicate that an alert has been sent digitalWrite(2,LOW); } else if (temp <= 32 && flag
== 1) { digitalWrite(2,HIGH); flag = 0; // Reset the flag when temperature drops back to 32C or
below } Blynk.virtualWrite(V1,temp); Blynk.virtualWrite(V2,hum); int adcValue =
analogRead(AOUT_PIN); //Moisture sensor reading float m = map(adcValue, 0, 4095, 100, 0);
delay(100); Serial.println(); Blynk.virtualWrite(V1,adcValue);
•.

Water level controller.

 Components Needed:

• ESP32 Development Board: Such as ESP32 Dev Kit or NodeMCU


ESP-32S.
•Water Level Sensor: Ultrasonic sensor or capacitive sensor to
detect water levels.
•Relay Module: To control the water pump or valve.
•Power Supply: Suitable power source for ESP32 and the
pump/valve.
•Breadboard and Jumper Wires: For prototyping and connecting
components.
•Arduino IDE: To program the ESP32
code

 define PIN_TRIG 26
 #define PIN_ECHO 25
 #define LOWLED 18
 #define MIDLED 19
 #define HIGHLED 21
 #define MOTOR 27
 unsigned int level = 0;
codes

 void setup()
 {
 pinMode(LOWLED,OUTPUT); pinMode(MIDLED,OUTPUT);
pinMode(HIGHLED,OUTPUT); pinMode(MOTOR,OUTPUT); digitalWrite(LOWLED,HIGH);
digitalWrite(MIDLED,HIGH); digitalWrite(HIGHLED,HIGH); digitalWrite(MOTOR,LOW);
Serial.begin(115200); pinMode(PIN_TRIG, OUTPUT); pinMode(PIN_ECHO, INPUT);
 }
codes

 void loop()
 { // Start a new measurement: digitalWrite(PIN_TRIG, HIGH); delayMicroseconds(10);
digitalWrite(PIN_TRIG, LOW); // Read the result: int duration = pulseIn(PIN_ECHO, HIGH);
Serial.print("Distance in CM: "); Serial.println(duration / 58); Serial.print("Distance in inches: ");
Serial.println(duration / 148);
 level = duration / 58
 if (level < 100) { digitalWrite(LOWLED,LOW); digitalWrite(MOTOR,HIGH);
digitalWrite(HIGHLED,HIGH); digitalWrite(MIDLED,HIGH); }
codes

 else if ((level > 200) && (level <400))


 { digitalWrite(LOWLED,HIGH);
 digitalWrite(HIGHLED,HIGH);
 digitalWrite(MIDLED,LOW); }
 else if (level >= 400 )
 { digitalWrite(HIGHLED,LOW); digitalWrite(MIDLED,HIGH);
digitalWrite(LOWLED,HIGH); digitalWrite(MOTOR,LOW); } delay(1000);}
Machine learning.

 Machine learning is a branch of artificial intelligence (AI) that focuses on developing algorithms
and techniques that allow computers to learn from and make predictions or decisions based on
data. Here are some key aspects and concepts related to machine learning:
 Key Concepts:
1. Supervised Learning:
1. In supervised learning, the algorithm learns from labeled data, where each example is paired with the
correct answer (label).
2. Example algorithms: Linear regression, logistic regression, decision trees, support vector machines
(SVM), neural networks.
Machine learning.

 Unsupervised Learning:
• Unsupervised learning deals with unlabeled data, where the algorithms try to find patterns or
structures in the data.
• Example algorithms: Clustering (e.g., K-means clustering), dimensionality reduction (e.g.,
Principal Component Analysis - PCA), association rule learning.
 Reinforcement Learning:
• Reinforcement learning involves an agent learning to make decisions by interacting with an
environment. The agent receives feedback in the form of rewards or penalties.
• Example algorithms: Q-learning, Deep Q Networks (DQN), policy gradient methods.
Ml

 Steps in a Typical Machine Learning Project:


1. Problem Definition: Clearly define the problem and objectives you want to solve using machine
learning.
2. Data Collection: Gather relevant data that will be used to train and test the machine learning
model.
3. Data Preprocessing: Clean the data, handle missing values, transform variables, and prepare the
data for modeling.
4. Feature Engineering: Select relevant features or create new features that may improve model
performance.
Ml

•Model Selection: Choose appropriate algorithms and techniques


based on the problem type (classification, regression, clustering, etc.)
and data characteristics.
•Training: Train the selected model(s) on the training dataset.
•Evaluation: Evaluate model performance using appropriate metrics
and validation techniques.
• Deployment: Deploy the trained model into a production
environment.
•Monitoring and Maintenance: Monitor model performance over
time, retrain periodically, and update as needed.
Applications of Machine Learning:

•Image and Speech Recognition: Facial recognition, object detection, voice assistants.
•Natural Language Processing (NLP): Sentiment analysis, language translation, chatbots.
•Healthcare: Disease prediction, medical image analysis, personalized treatment plans.
•Finance: Fraud detection, risk assessment, stock market prediction.
•Recommendation Systems: Product recommendations, movie/music recommendations.
•Autonomous Vehicles: Self-driving cars, drone navigation.
Trained a model for motion detection (up-down, right-left, front-back) using edge
impulse.

 #include <Arduino.h>
 #include <EdgeImpulseSettings.h>
 #include <ei_run_classifier.h>
 #include <Wire.h>
 #include <SPI.h>
 #include <WiFi.h>
 #include <WiFiClient.h>
 #include <BlynkSimpleEsp32.h>
Codes

 #define BLYNK_TEMPLATE_ID "TMPL3xFzjUSV-"


 #define BLYNK_TEMPLATE_NAME "led"
 #define BLYNK_AUTH_TOKEN "RUBUDHI-AyPL-wIOwtpW9XTRoFCaQPCd"
 #define BLYNK_PRINT Serial
 // Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "your_SSID";
 char pass[] = "your_PASSWORD";
 #define INTERVAL_MS 1000
 // Variable to store the classification result static bool debug_nn = false; static bool debug_dsp =
false;
Codes

 bool readReady = false;


 bool idle = false;
 bool writing = false;
 bool connection = true; uint64_t SamplingInterval, LastSampleTime, CurrentSampleTime,
LoopExecutionStartTime, ReadTime, WriteTime;
 void setup(void)
 { // put your setup code here, to run once: Serial.begin(115200); delay(1000); // wait for console to
open Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
 }
 void loop(void)
 {
 // put your main code here, to run repeatedly: Blynk.run();
This Photo by Unknown Author is licensed under CC BY-NC

You might also like