Professional Documents
Culture Documents
Shashank Iot Ml Ppt
Shashank Iot Ml Ppt
Shashank Iot Ml Ppt
SHASHANK SHEKHAR
1NT21EC131
Internet of things
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.
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:
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
#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
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);
•.
Components Needed:
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
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
•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