Skip to content

Instantly share code, notes, and snippets.

View scealux's full-sized avatar
🎯
Focusing

Alex Fiel scealux

🎯
Focusing
View GitHub Profile
@scealux
scealux / Project Code
Created May 20, 2019 05:08
Code for first Object Project
// Adafruit NeoPixel - Version: Latest
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
//set out signal pin
#define PIN 9
@scealux
scealux / SerialHSB.js
Created May 22, 2019 23:05
An Arduino with a potentiometer communicates back and forth with a HSB selector running in p5
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);
@scealux
scealux / AIO_Extension.js
Created May 22, 2019 23:11
Extension for my AIO Project
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
@scealux
scealux / index.html
Created October 1, 2019 09:03
Colon Sand Clock
<!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>
#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
@scealux
scealux / Chartreuse.ino
Last active May 17, 2022 20:54
Control code for Chartreuse the moving robot
// SERVO
#include <Servo.h>
//NEOPIXELS
#include <Adafruit_NeoPixel.h>
//STEPPER
#include "Stepper_28BYJ_48.h"
#ifdef __AVR__