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 <DS3231.h> //Realtime Clock (RTC) Library from: http://www.rinkydinkelectronics.com/library.php?id=73 | |
#include <Stepper.h> //Arduino Stepper Library | |
//----------------------------------------- Limit Switch ----------------------------------------- | |
int switchPin = 6; | |
//----------------------------------------- Stepper Motor ----------------------------------------- | |
const int stepsPerRev = 200; //360 degrees / 1.8 degrees per step | |
const int sleepPin1 = 2; //Pins for enabling or disabling the h-bridge |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.dom.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/addons/p5.sound.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<meta charset="utf-8" /> | |
<link href="https://fonts.googleapis.com/css?family=Inconsolata&display=swap" rel="stylesheet"> | |
</head> |
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
// SERVO | |
#include <Servo.h> | |
//NEOPIXELS | |
#include <Adafruit_NeoPixel.h> | |
//STEPPER | |
#include "Stepper_28BYJ_48.h" | |
#ifdef __AVR__ |
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
var tR, tG, tB, cR, cG, cB = 0; | |
var serial; //variable to hold an instance of the serial port library | |
var portName = 'COM3'; //fill in with YOUR port | |
function setup() { | |
createCanvas(400, 400); | |
serial = new p5.SerialPort(); //a new instance of serial port library |
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
var serial; //variable to hold an instance of the serial port library | |
var portName = 'COM3'; //fill in with YOUR port | |
var data = [0,1]; | |
var numLED = 0; | |
function setup() { | |
createCanvas(400, 300); | |
textSize(15); | |
hSlider = createSlider(0, 100, 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
// Adafruit NeoPixel - Version: Latest | |
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
//set out signal pin | |
#define PIN 9 |