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
const int tiltPin = 2; | |
const int redLed = 11; | |
const int greenLed = 10; | |
const int blueLed = 9; | |
int tiltState; | |
int count = 0; | |
void setup() { | |
pinMode(redLed, OUTPUT); |
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> // Include the Servo library | |
#define SERVO 3 | |
#define TRIGPIN 12 | |
#define ECHOPIN 11 | |
#define PIEZO 8 | |
Servo myServo; // Create a servo object | |
int val = 0; | |
long duration; | |
long distance; |
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> | |
Servo Servo_X; | |
Servo Servo_Y; | |
Servo Servo_Grip; | |
#define Joy_X A0 | |
#define Joy_Y A1 | |
#define BUTTON 2 |
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 <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27, 20, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display | |
#define PIEZO 8 | |
#define WIRE 9 | |
#define FINISH 10 | |
#define NOTE_C5 523 | |
#define NOTE_D5 587 | |
#define NOTE_E5 659 |
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
/* | |
-------------------------------------------------------------------------------------------------------------------- | |
Example sketch/program showing how to read data from a PICC to serial. | |
-------------------------------------------------------------------------------------------------------------------- | |
Typical pin layout used: | |
----------------------------------------------------------------------------------------- | |
MFRC522 Arduino Arduino Arduino Arduino Arduino | |
Reader/PCD Uno/101 Mega Nano v3 Leonardo/Micro Pro Micro | |
Signal Pin Pin Pin Pin Pin Pin | |
----------------------------------------------------------------------------------------- |
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
/************************************************************* | |
Control multiple servo using a Blynk App! | |
App project setup: | |
*************************************************************/ | |
/* Comment this out to disable prints and save space */ | |
#define BLYNK_PRINT Serial | |
#include <ESP8266_Lib.h> |
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
#define BLYNK_PRINT Serial | |
#include <WiFi.h> | |
#include <WiFiClient.h> | |
#include <BlynkSimpleEsp32.h> | |
// You should get Auth Token in the Blynk App. | |
// Go to the Project Settings (nut icon). | |
char auth[] = "YourAuthToken"; | |
// Your WiFi credentials. |
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 <ESP8266_Lib.h> | |
#include <BlynkSimpleShieldEsp8266.h> | |
// You should get Auth Token in the Blynk App. | |
// Go to the Project Settings (nut icon). | |
char auth[] = "YourAuthToken"; | |
// Your WiFi credentials. | |
// Set password to "" for open networks. | |
char ssid[] = "YourNetworkName"; |
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> | |
Servo myservo1; // create servo object to control a servo1 | |
Servo myservo2; // create servo object to control a servo2 | |
const int sensorPin = 3; // the number of the IR sensor pin | |
int sensorState = 0; // variable for reading the IR sensor status | |
void setup() { | |
// initialize the IR sensor pin as an input: | |
pinMode(sensorPin, INPUT); |
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 <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define LED_RING 5 | |
#define SENSOR 6 | |
#define PIEZO 8 | |
#define NUMPIXELS 12 // NeoPixel ring size |