Skills Dev 1: A Simple Internet Appliance

Made by jmaffey · UNLISTED (SHOWN IN POOLS)

Get oriented with the Particle platform, build my first circuit, and code my first project.

Created: November 9th, 2021

0
As you can see in the videos below, I was able to make the light blink on and off every 3 seconds, blink on and off 5 times then stop for 3 seconds, and have two LEDs alternate. 


For this project, everything worked the first time. I liked being able to control what the lights did, and experimented with how short I could make the delay with the two LEDs and still perceive them flashing back and forth. That turned out to be 30 milliseconds. 

Exercise 1: https://youtu.be/kgB04jk-u9U

Exercise 2: https://youtu.be/99xmrp1OqZs

Exercise 3: https://youtu.be/AUiiRDNJ3Z4

0
Exercise 1
int ledPin = D2;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH); 
  delay(1000); 

  digitalWrite(ledPin, LOW);
  delay(1000); 

}
Click to Expand
0
Exercise 2
int ledPin = D2;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH);
  delay(500);

  digitalWrite(ledPin, LOW);
  delay(500); 
  
    digitalWrite(ledPin, HIGH);
  delay(500);

  digitalWrite(ledPin, LOW);
  delay(500); 
  
    digitalWrite(ledPin, HIGH);
  delay(500);

  digitalWrite(ledPin, LOW);
  delay(500); 
  
    digitalWrite(ledPin, HIGH);
  delay(500);

  digitalWrite(ledPin, LOW);
  delay(500); 
  
    digitalWrite(ledPin, HIGH);
  delay(500);

  digitalWrite(ledPin, LOW);
  delay(3000); 
  

}
Click to Expand
0
Exercise 3
int ledPin = D2;
int ledPin2 = D3;

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(ledPin2, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH);
  digitalWrite(ledPin2, LOW);
  delay(500);

  digitalWrite(ledPin, LOW); 
  digitalWrite(ledPin2, HIGH);
  delay(500); 
  

}
Click to Expand
0
0
x
Share this Project

This project is only listed in this pool. Be considerate and think twice before sharing.


Courses

About

Get oriented with the Particle platform, build my first circuit, and code my first project.