TJ Hunter
Published

Lock and Unlock Your Car via the Internet!

Using an old car keyfob and a Particle Electron, you can remotely lock and unlock your vehicle.

IntermediateShowcase (no instructions)2 hours6,798
Lock and Unlock Your Car via the Internet!

Things used in this project

Hardware components

Electron
Particle Electron
×1
Opto-Isolator
Opto-Isolator
×1
Car Key fob
×1

Story

Read more

Code

Electron code

C/C++
Paste this into the Particle Cloud IDE
void setup() {
    pinMode(D2, OUTPUT);
    pinMode(D3, OUTPUT);
    pinMode(D4, OUTPUT);
    Particle.function("lock", lock);
    Particle.function("unlock", unlock);
    Particle.function("panic", panic);
} 

int lock(String command) {
    digitalWrite(D2, HIGH);
    delay(100);
    digitalWrite(D2, LOW);
}

int unlock(String command) {
    digitalWrite(D3, HIGH);
    delay(100);
    digitalWrite(D3, LOW);
}

int panic(String command) {
    digitalWrite(D4, HIGH);
    delay(1000);
    digitalWrite(D4, LOW);
}

void loop() {
}

Credits

TJ Hunter

TJ Hunter

4 projects • 27 followers

Comments