Skip to content

Instantly share code, notes, and snippets.

View jskyjohnson's full-sized avatar
💭
I like to code!

Sky Johnson jskyjohnson

💭
I like to code!
View GitHub Profile
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
// Need G4P library
import g4p_controls.*;
// You can remove the PeasyCam import if you are not using
// the GViewPeasyCam control or the PeasyCam library.
//import peasy.*;
PFont f;
int order_value;
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(5, 6, NEO_GRB + NEO_KHZ800);
int Pot = A0;
int Mic = A1;
var serial; // variable to hold an instance of the serialport library
var portName = 'COM6'; // fill in your serial port name here
var inData;
var options = { baudrate: 9600};
var divisions = 3;
var canvasObect;
var speed = 5; //between 0.5 - 5?
var heightMultiplier = 1;
//Sky Johnson
//Lab 4, Servo thing. Literally copied almost entirely from the examplew
#include <Servo.h>
Servo servo;
int potpin = 0;
int val;
void setup()
#include <Stepper.h>
const int stepsPerRevolution = 513;
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
void setup() {
pinMode(13, OUTPUT);
myStepper.setSpeed(25);
Serial.begin(9600);
// Sky Johnson
// Lab 4. Part 2, DC Controller
bool direction; //false is spinning one way, true is spinning the other way.
const int ledpin1 = 11;
const int ledpin2 = 10;
const int buttonpin = A0;
/* Interesting Music box
* BY: Sky Johnson
* FOR: ATLS3300 Object
* Lab 3, Analog IO
*
* This entire project was inspired by this BEAUTIFUL piece of bitshift abuse
* Called Bitshift Variations in C Minor
* https://www.youtube.com/watch?v=cRFMip5NlgY
* However, I wasn't able to get this exact song to work (I'm very sad still, maybe someday but I need to abuse the timers more)
*
const int speakerOut = 10;
const int photos = A0;
int value;
void setup() {
// put your setup code here, to run once:
pinMode(10, OUTPUT);
Serial.begin(9600);
}
int pot;
int light;
const int potentpin = A0;
const int lightpin = A1;
const int light1pin = 9;
const int light2pin = 10;
void setup() {