Pro Maker_101
Published © GPL3+

How to Control Bike/Scooty Using Your Smartphone

Hey guys!! How are you ? I am going to do here today is how to control our bike using a smartphone.

IntermediateFull instructions provided101
How to Control Bike/Scooty Using Your Smartphone

Things used in this project

Hardware components

PCBWay Custom PCB
PCBWay Custom PCB
×1
ESP8266-12E Module ( NodeMCU)
×1
12v Relay
×4
7805 regulator IC With Heatsink
×1
2200uF/25V Capacitor
×1
BC547 Transistor
×4
Resistor 1k ohm
Resistor 1k ohm
×5
1N4007 – High Voltage, High Current Rated Diode
1N4007 – High Voltage, High Current Rated Diode
×5
LED (generic)
LED (generic)
×1
3 Pin Screw Connector
×1
4 Pin Screw Connector
×1
Female Header Pins
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Solder Flux, Soldering
Solder Flux, Soldering

Story

Read more

Schematics

screenshot_(365)_zbl3HgV4Np.png

Code

CODE

C/C++
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

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

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "HOTSPOT SSID";
char pass[] = "HOTSPOT PASSWORD";



  const int Relay_1 = 16;       //D0
  const int Relay_2 = 5;        //D1
  const int Relay_3 = 4;        //D2
  const int Relay_4 = 0;        //D3






void setup()
{
  pinMode(Relay_1, OUTPUT);
  pinMode(Relay_2, OUTPUT);
  pinMode(Relay_3, OUTPUT);
  pinMode(Relay_4, OUTPUT);


    digitalWrite(Relay_1, LOW);
    digitalWrite(Relay_2, LOW);
    digitalWrite(Relay_3, LOW);
    digitalWrite(Relay_4, LOW);


  
  // Debug console
  Serial.begin(115200);
  Blynk.begin(auth, ssid, pass);





}

void loop()
{
  Blynk.run();
}










/********************** Relay 1  ON/OFF V1 *******************************/
BLYNK_WRITE(V1)
  {
  int pinValue = param.asInt();
  if (pinValue == 1)
    {
    digitalWrite(Relay_1, HIGH);
    Serial.println("Relay 1 On");
    }
  else if (pinValue == 0)
    {
    digitalWrite(Relay_1, LOW);
    Serial.println("Relay 1 Off");
    }
  }



/********************** Relay 2  ON/OFF V2 *******************************/
BLYNK_WRITE(V2)
  {
  int pinValue = param.asInt();
  if (pinValue == 1)
    {
    digitalWrite(Relay_2, HIGH);
    Serial.println("Relay 2 On");
    }
  else if (pinValue == 0)
    {
    digitalWrite(Relay_2, LOW);
    Serial.println("Relay 2 Off");
    }
  }



/********************** Relay 3  ON/OFF V3 *******************************/
BLYNK_WRITE(V3)
  {
  int pinValue = param.asInt();
  if (pinValue == 1)
    {
    digitalWrite(Relay_3, HIGH);
    Serial.println("Relay 3 On");
    }
  else if (pinValue == 0)
    {
    digitalWrite(Relay_3, LOW);
    Serial.println("Relay 3 Off");
    }
  }



/********************** Relay 4  ON/OFF V4 *******************************/
BLYNK_WRITE(V4)
  {
  int pinValue = param.asInt();
  if (pinValue == 1)
    {
    digitalWrite(Relay_4, HIGH);
    Serial.println("Relay 4 On");
    }
  else if (pinValue == 0)
    {
    digitalWrite(Relay_4, LOW);
    Serial.println("Relay 4 Off");
    }
  }

Credits

Pro Maker_101

Pro Maker_101

9 projects • 3 followers
Electrical,Electronics,DIY

Comments

Add projectSign up / Login