Isaac Wolf
Published © GPL3+

Lane Tech HS - PCL - <Using Blynk to Control Lights>

This project was part of the Lane Tech HS Physical Computing. This project involves relays, and the app Blynk to control lights.

IntermediateFull instructions provided1 hour80
Lane Tech HS - PCL - <Using Blynk to Control Lights>

Things used in this project

Hardware components

Photon
Particle Photon
×1
Relay
×2
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Female/Female Jumper Wires
Female/Female Jumper Wires
×1
Extension Cord
×1

Software apps and online services

Blynk
Blynk

Story

Read more

Schematics

Relay Wiring

Relay wiring qudebjowzh

Code

Code

C/C++
This is the code that Blynk controls. It powers the relays on and off.
 *************************************************************

  No coding required for direct digital/analog pin operations!

 *************************************************************/

#define BLYNK_PRINT Serial  // Set serial output for debug prints
//#define BLYNK_DEBUG       // Uncomment this to see detailed prints

#include <blynk.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "Input your Auth Token Here";
int lampLed = D1;
int fanLed = D2;


void setup()
{
    Serial.begin(9600);
    delay(5000); // Allow board to settle
    pinMode(lampLed, OUTPUT);
    pinMode(fanLed, OUTPUT);
    Blynk.begin(auth);
}


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

Credits

Isaac Wolf

Isaac Wolf

1 project • 1 follower

Comments

Add projectSign up / Login