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 <RTClib.h> | |
//Declare pin functions on RedBoard | |
#define stp 8 | |
#define dir 8 | |
#define MS1 10 | |
#define MS2 11 | |
#define EN 12 | |
int reed = 10; | |
int stepInterval=0; |
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
int count = 0; | |
void setup() { | |
pinMode(2,OUTPUT); | |
pinMode(3,OUTPUT); | |
pinMode(4,OUTPUT); | |
pinMode(5,OUTPUT); | |
pinMode(6,OUTPUT); | |
pinMode(7,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
void setup() { | |
pinMode(2,OUTPUT); | |
pinMode(3,OUTPUT); | |
pinMode(5,OUTPUT); | |
pinMode(6,OUTPUT); | |
pinMode(7,OUTPUT); | |
pinMode(8,OUTPUT); | |
pinMode(9,OUTPUT); | |
pinMode(10,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 <CapacitiveSensor.h> | |
int pin5=5; | |
int pin3=3; | |
CapacitiveSensor cs_3_2 = CapacitiveSensor(3,2); | |
void setup() { | |
cs_3_2.set_CS_AutocaL_Millis(0xFFFFFFFF); | |
Serial.begin(9600); |
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> | |
int light =1; //LIGHTS | |
int pho =A1; //PHOTOCELL | |
int but = 0; //BUTTON | |
int last =0; //LAST STATE OF THE BUTTON | |
int butCount=0;//COUNT OF THE BUTTON | |
int count=0; | |
//int r=255; | |
//int g=255; |
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 <CapacitiveSensor.h> | |
CapacitiveSensor cs_one = CapacitiveSensor(2,3); | |
CapacitiveSensor cs_two = CapacitiveSensor(8,9); | |
CapacitiveSensor cs_three = CapacitiveSensor(10,11); | |
int blue= 5; | |
int white= 6; | |
int yellow =7; | |
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
int stp =2; | |
int dir=3; | |
int witch=8; | |
int state; | |
void setup() { | |
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> | |
const int switchPin = 2; // 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 | |
void setup() { |
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 spin; | |
void setup() { | |
attach the servo motor | |
spin.attach(9); | |
Serial.begin(9600); | |
} |
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
int knob=0; | |
int flex=0; | |
int income=0; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(9, OUTPUT); | |
pinMode(A0,INPUT); | |
pinMode(A2,INPUT); | |
} |
NewerOlder