Marcin GrudaDaniel Law
Published © GPL3+

Lane Tech HS - HumidiDrowner

Stopping my humidifier from working by drowning it via servo when it is no longer dark or when I want.

IntermediateShowcase (no instructions)8 hours28
Lane Tech HS - HumidiDrowner

Things used in this project

Hardware components

Argon
Particle Argon
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
Photo resistor Module For Arduino
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE
Blynk
Blynk

Story

Read more

Schematics

Circuit Schematic

Code

Particle Argon Code

C/C++
Basic code for integrating Blynk and Photoresistor input and turning it into a servo motion.
// This #include statement was automatically added by the Particle IDE.
#include <blynk.h>

int servoPin = A3;
Servo myServo;
int servoPos = 0;
int photosensor = A0;
char auth[] = "4GIrgl5j9aTwW3Av-EvcDOm-iQCJaI70";
int blynkVal;

void setup() 
{
    myServo.attach(A3);
    Blynk.begin(auth);
}

BLYNK_WRITE(V0)
{
    blynkVal = param.asInt();
}

void loop() 
{
    Blynk.run();
    if (analogRead(photosensor) > 4000)
    {
        myServo.write(0);
    } else
    {
        myServo.write(blynkVal);
    }
    delay(500);
}

Credits

Marcin Gruda

Marcin Gruda

3 projects • 1 follower
Daniel Law

Daniel Law

39 projects • 4 followers
Teacher. Maker. Citizen of the planet.

Comments

Add projectSign up / Login