This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Raw method to show you how to shut off all | |
* the LED's on our Simulated Menorah | |
*/ | |
//shut off all lights | |
void allOff(){ | |
for(int pin=start; pin <= 10; pin++){ | |
digitalWrite(pin, LOW); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//method to control the menorah | |
void lightMenorah(){ | |
int reading = digitalRead(button); | |
if (reading != lastButtonState) { | |
lastDebounceTime = millis(); | |
} | |
if ((millis() - lastDebounceTime) > debounceDelay) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Overview of L298N controller for Robotics | |
* Controls how our robot moves. | |
* Developed for the Beginner Bots lesson series on www.learnrobotics.org/blog | |
* Written by Liz Miller | |
* 11/16/18 | |
*/ | |
//Left Motor | |
int enableA = 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Tiny Robot Car Motor Example | |
Forward then Stop | |
This code is untested and is used for demonstration purposes. | |
Modifications might be needed. Use at your own risk. | |
Last updated 11/15/18 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
/* | |
* Pan Tilt Servos | |
* Written by Liz Miller | |
* for Learn Robotics (www.learnrobotics.org) | |
* Version 1.1 | |
* 9-19-18 | |
* --- | |
* The Software is provided "AS IS" and "WITH ALL FAULTS," | |
* without warranty of any kind, including without limitation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
// WiFi parameters | |
const char* ssid = "your-ssid"; //replace with your ssid | |
const char* password = "your-pw";//replace with your pw | |
// IFTTT Maker parameters: | |
char MakerIFTTT_Key[] = "your-ifttt-key"; // Obtained when setting up/connecting the Maker channel in IFTTT | |
char MakerIFTTT_Event[] = "wemos-trigger"; // Arbitrary name for the event; used in the IFTTT recipe. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
// WiFi parameters | |
const char* ssid = "your-ssid"; //replace with your ssid | |
const char* password = "your-pw";//replace with your pw | |
// IFTTT Maker parameters: | |
char MakerIFTTT_Key[] = "your-ifttt-key"; // Obtained when setting up/connecting the Maker channel in IFTTT | |
char MakerIFTTT_Event[] = "wemos-trigger"; // Arbitrary name for the event; used in the IFTTT recipe. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
// WiFi parameters | |
const char* ssid = "your-ssid"; //replace with your ssid | |
const char* password = "your-pw";//replace with your pw | |
// IFTTT Maker parameters: | |
char MakerIFTTT_Key[] = "your-ifttt-key"; // Obtained when setting up/connecting the Maker channel in IFTTT | |
char MakerIFTTT_Event[] = "wemos-trigger"; // Arbitrary name for the event; used in the IFTTT recipe. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
// WiFi parameters | |
const char* ssid = "your-ssid"; //replace with your ssid | |
const char* password = "your-pw";//replace with your pw | |
// IFTTT Maker parameters: | |
char MakerIFTTT_Key[] = "your-ifttt-key"; // Obtained when setting up/connecting the Maker channel in IFTTT | |
char MakerIFTTT_Event[] = "wemos-trigger"; // Arbitrary name for the event; used in the IFTTT recipe. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create a method to control the LED's | |
void ctrlLEDs(String topic, byte receivedChar){ | |
if (topic == "ledStatus/red"){ //every LED has it's own topic for individual control | |
if(receivedChar == '1'){ | |
digitalWrite(redLED, HIGH); | |
} | |
else if (receivedChar == '0'){ | |
digitalWrite(redLED, LOW); | |
} |
NewerOlder