This file contains hidden or 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 <CapacitiveSensor.h> | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define neoPin 7 | |
#define trigPin 13 | |
#define echoPin 12 |
This file contains hidden or 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 switchPin = 8; // switch input | |
const int motor1Pin = 3; // H-bridge leg 1 (pin 2, 1A) | |
const int motor2Pin = 4; // H-bridge leg 2 (pin 7, 2A) | |
const int enablePin = 9; // H-bridge enable pin | |
int switchState = 0; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(switchPin, INPUT); |
This file contains hidden or 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> | |
//make an instance of the servo library | |
Servo myServo; | |
void setup() { | |
attach the servo motor | |
myServo.attach(9); | |
Serial.begin(9600); | |
} |
This file contains hidden or 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
int dirPin = 3; | |
int stepPin = 2; | |
int switchPin = 8; | |
int switchState = 0; | |
void setup(){ | |
pinMode(dirPin, OUTPUT); | |
pinMode(stepPin, OUTPUT); | |
pinMode(switchPin,INPUT); |
This file contains hidden or 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
int pot=0; | |
int slider=0; | |
int incoming; | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif |
This file contains hidden or 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 <CapacitiveSensor.h> | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define neoPin A2 | |
#define trigPin 11 | |
#define echoPin 12 |
This file contains hidden or 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
int pot = 0; | |
int potPin = A0; | |
int slider = 0; | |
int slidePin = A1; | |
int frequency = 0; | |
int soundPin = 8; | |
int led = 11; | |
int brightness = 0; | |
void setup() { |
This file contains hidden or 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
int photoPin = A0; | |
int sensorReading = 0; | |
int frequency = 0; | |
int soundPin = 8; | |
void setup() { | |
Serial.begin(9600); | |
// pinMode(soundPin, OUTPUT); | |
} |
This file contains hidden or 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
int pot = 0; | |
int potPin = A0; | |
int brightness1 = 0; | |
int brightness2 = 0; | |
int oneLED = 9; | |
int twoLED = 10; | |
int photoPin = A1; | |
int lightVal = 0; | |
void setup() { |
This file contains hidden or 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 PIN 6 | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(5, PIN, NEO_GRB + NEO_KHZ800); | |
const int buttonPin1 = 2; |