MakrToolbox
Published © CC BY-NC

"IN THE SHOP" LED IoT Light With Particle

I run a computer shop, I repair computers and such, but I really enjoy building stuff and working in the shop. The only issue is that whe...

BeginnerFull instructions provided2 hours3,783
"IN THE SHOP" LED IoT Light With Particle

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
White LED strip
×1
12v 2amp DC Power Adapter
×1
5v Arduino Single Relay Module
×1
DC Converter Module 12V To 5V 3A 15W with Micro USB Cable
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Particle Build Web IDE
Particle Build Web IDE

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Laser cutter (generic)
Laser cutter (generic)

Story

Read more

Schematics

DXF File #1

DXF File #2

CorelDraw File

Code

Code snippet #1

Plain text
void setup() {
    Spark.function("parse", parse);
    
    // 0-7 maps to D0-D7
    for (int i = 0; i <= 7; i++) {
        pinMode(i, OUTPUT);
    }
}

void loop() {
}

int parse(String cmd) {
    cmd.trim();
    cmd.toUpperCase();
    
    if (cmd.startsWith("ENABLE")) {
        int pin = cmd.substring(7).toInt();
        digitalWrite(pin, HIGH);
  
    }
   if (cmd.startsWith("DISABLE")) {
        int pin = cmd.substring(7).toInt();
        digitalWrite(pin,LOW);
  
   }
}

Credits

MakrToolbox

MakrToolbox

9 projects • 14 followers

Comments