usaal
Published © GPL3+

Advanced Bike Automation

This project lets you drive without carrying keys for your bike. It turns your bike on/off based on the distance between you and your bike.

AdvancedFull instructions provided716
Advanced Bike Automation

Things used in this project

Hardware components

Male/Female Jumper Wires
Male/Female Jumper Wires
×1
Adafruit Feather HUZZAH with ESP8266 WiFi
Adafruit Feather HUZZAH with ESP8266 WiFi
×1
Signal Relay, 5 VDC
Signal Relay, 5 VDC
×1
DC/DC Converter, Step Down
DC/DC Converter, Step Down
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit DAIAGRAM

Do the connections as per the diagram and connect the ignition indicator and self to relays accordingly.

Code

Advanced Automation

C/C++
Its automation . Its very simple . Just upload the code to esp8266 board and do the connections .
#include <ESP8266WiFi.h>

//Name of the wifi network whom we are supposed to track
const char *SSID = Your_wifi_id;
const char *pass = Your_wifi_password;

WiFiClient client;

// Relay pin number
int relay=2;
int relay3=0;

// Return RSSI(Received Signal Strength Indicator) or 0 if target SSID not found
int32_t getRSSI(const char* target_ssid) {
byte available_networks = WiFi.scanNetworks();

for (int network = 0; network < available_networks; network++) {
if (WiFi.SSID(network).compareTo(target_ssid) == 0) { //stringOne.compareTo 1(stringTwo) < 0
return WiFi.RSSI(network);
}

}
return 0;
}

void setup() {
Serial.begin(115200);
delay(10);

Serial.println("Connecting to ");
Serial.println(SSID);

WiFi.begin(SSID,pass);
while(WiFi.status() !=WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println(WiFi connected);
int32_t rssi = getRSSI(SSID);

// For debugging purpose only
Serial.print("Signal strength: ");
Serial.print(rssi);
Serial.println(dBm);

pinMode(relay, OUTPUT); // Initialize the relay pin as an output.
pinMode(relay3,OUTPUT);

if (rssi > (-55) && rssi != 0)
digitalWrite(relay,LOW);
delay(750);
digitalWrite(relay,HIGH);
Serial.println(SELF ON);
}
void loop(){

int32_t rssi = getRSSI(SSID);

// For debugging purpose only
Serial.print("Signal strength: ");
Serial.print(rssi);
Serial.println(dBm);

if (rssi > (-55) && rssi != 0) // if rssi is greater then -70 dbm or its 0 dbm, then the light will turn
{
digitalWrite(relay3, LOW);
Serial.println(ON);
}
if (rssi < (-55) && rssi != 0)

{
digitalWrite(relay3,HIGH);
Serial.println(OFF);
}
if(rssi > (-55) && rssi !=0)
{
digitalWrite(relay,LOW);
Serial.println(RELAY ON);
delay(750);
digitalWrite(relay,HIGH);
Serial.println(RELAY OFF);
}
}

Credits

usaal

usaal

0 projects • 2 followers

Comments