Skills Dev 1: Nicole
Made by Nicole Chu · UNLISTED (SHOWN IN POOLS)
Made by Nicole Chu · UNLISTED (SHOWN IN POOLS)
Skills Dev 1: A Simple Internet Appliance
Created: December 13th, 2020
To better understand the Particle platform and get started with circuit-building, our first skills development activity had us making an LED blink, with different sub-exercises exploring this further.
int ledPin = D2;
void setup() {
// We want to tell the Argon that we'll use
// D2 as an output pin.
pinMode(ledPin, OUTPUT);
}
void loop() {
// First... On
digitalWrite(ledPin, HIGH); // Turn ON the LED pins
delay(1000); // Wait for 1000mS = 1 second
// Now... Off
digitalWrite(ledPin, LOW); // Turn OFF the LED pins
delay(1000); // Wait for 1000mS = 1 second
// rinse + repeat
}
Click to Expand
int ledPin = D2;
void setup() {
// We want to tell the Argon that we'll use
// D2 as an output pin.
pinMode(ledPin, OUTPUT);
}
void loop() {
// First... On
digitalWrite(ledPin, HIGH); // Turn ON the LED pins
delay(3000); // Wait for 3000mS = 3 seconds
// Now... Off
digitalWrite(ledPin, LOW); // Turn OFF the LED pins
delay(3000); // Wait for 3000mS = 3 seconds
// rinse + repeat
}
Click to Expand
int ledPin = D2; // initialize pin D2 where LED is connected to
void setup() {
// We want to tell the Argon that we'll use
// D2 as an output pin.
pinMode(ledPin, OUTPUT);
}
void loop() {
// loop to turn LED on 5 times
for (int i = 1; i < 6; i++){
digitalWrite(ledPin, HIGH); // Turn ON the LED pins
delay(500); // Wait for 500mS = 0.5 seconds
digitalWrite(ledPin, LOW); // Turn OFF the LED pins
delay(500); // Wait for 500mS = 0.5 seconds
}
digitalWrite(ledPin, LOW); // Turn OFF the LED pins
delay(3000); // Wait for 3000mS = 3 seconds
// rinse + repeat
}
Click to Expand
int ledPin1 = D2; // initialize pin D2 where LED 1 is connected to
int ledPin2 = D3; // initialize pin D3 where LED 2 is connected to
void setup() {
// We want to tell the Argon that we'll use
// D2 and D3 as output pins.
pinMode(ledPin1, OUTPUT);
pinMode(ledPin2, OUTPUT);
}
void loop() {
digitalWrite(ledPin1, HIGH); // Turn ON the LED 1 pins
digitalWrite(ledPin2, LOW); // Turn OFF the LED 2 pins
delay(1000); // Wait for 3000mS = 3 seconds
digitalWrite(ledPin1, LOW); // Turn ON the LED 1 pins
digitalWrite(ledPin2, HIGH); // Turn OFF the LED 2 pins
delay(1000); // Wait for 3000mS = 3 seconds
}
Click to Expand
Although I already have experience with Arduino and circuit building, this activity was a good refresher on the basics and provided a good introduction to the Particle platform.
If I had more time, I would have liked to explore the Connected LED exercises. After this activity, I will move onto Skills Dev 2.