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 hours3,429
Lock and Unlock your car via the Internet!

Things used in this project

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 • 22 followers
Contact

Comments