JustDoElectronics
Published © MIT

Smart Dustbin With GPS Location

Hey Friends In This Video I Will Show You How To Make Smart Dustbin With GPS Location | Smart Garbage Dustbin Using Esp8266, GSM, GPS |

ExpertFull instructions provided3 hours15
Smart Dustbin With GPS Location

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
Ultrasonic Sensor - HC-SR04
SparkFun Ultrasonic Sensor - HC-SR04
×1
Arduino GSM shield V2
Arduino GSM shield V2
×1
Adafruit Ultimate GPS Breakout
Adafruit Ultimate GPS Breakout
×1
RGB Backlight LCD - 16x2
Adafruit RGB Backlight LCD - 16x2
×1

Story

Read more

Schematics

CIrcuit Diagram

Code

Code

Arduino
//Prateek
//www.prateeks.in

#define BLYNK_PRINT Serial
#include <Ultrasonic.h>

#include <SPI.h>
#include <WiFi101.h>
#include <BlynkSimpleMKR1000.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "hftydytfuygiuguyfytced9";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "justdo";
char pass[] = "phuhbjjnk";

BlynkTimer timer;
int distance = 0;
int thresh[3] = {25, 50, 75};
Ultrasonic ultrasonic(12, 13);

WidgetLED green(V1);
WidgetLED orange(V2);
WidgetLED red(V3);



void setup()
{
  // Debug console
  Serial.begin(9600);
  Blynk.begin(auth, ssid, pass);
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}

void loop()
{
  distance = ultrasonic.distanceRead();
  Serial.println(distance);
  Blynk.run();

  if(distance<thresh[0]){
    green.on();
    }
  else if(distance<thresh[1])
    green.on();
    orange.on();
  }
  else if(distance<thresh[2])
    green.on();
    orange.on();
    red.on();
  }
  else{
    green.off();
    orange.off();
    red.off();
  delay(100);
}

Credits

JustDoElectronics

JustDoElectronics

1 project • 0 followers
Electronics And Tele-Communication Engineer

Comments

Add projectSign up / Login