Skip to content

Instantly share code, notes, and snippets.

#include <Adafruit_CircuitPlayground.h>
//Declare Pins
int analogPin= 11;
int analogValue;
// For final output
int beakPressure;
// Variables for Y
float prevY;
float currentY;
float accelerationY;
@mcshanneng
mcshanneng / index.htm
Last active September 17, 2019 01:47
This is the sketch that allows you to draw on the other sketch
<!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>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.25.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<meta charset="utf-8" />
@mcshanneng
mcshanneng / index.htm
Created September 17, 2019 01:43
These are the files for the sketch where the results of the input are shown and the drawings appear
<!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>
<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.4.25.2.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<meta charset="utf-8" />
/
*/
#include <Servo.h>
Servo myservo;
int pos = 0;
//Declaring Variables for Neopixels
#include <Adafruit_NeoPixel.h>
#define PIN 6
#define NUM_LEDS 64
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
//Declaring Servo
#include <Servo.h>
Servo servodoor;
#include <Servo.h>
Servo flagA;
Servo flagB;
//Variables
//Flags
int flA = 9;
int flB = 10;
//Inputs
@mcshanneng
mcshanneng / Useless_M._T1.ino
Created March 3, 2019 20:07
Assignment 3(Useless machines) testing
boolean FlagAcon;
boolean FlagBcon;
void setup() {
// put your setup code here, to run once:
pinMode(4,INPUT);
pinMode(7,INPUT);
pinMode(13, OUTPUT);
pinMode(12,OUTPUT);
Serial.begin(9600);
//Variables for pin numbers
int ringSma = 11;
int ringMed = 10;
int ringBig = 9;
void setup() {
// put your setup code here, to run once:
pinMode(0, INPUT);
pinMode(ringSma, OUTPUT);
pinMode(ringMed, OUTPUT);
//Variables for each LED
int lightningA = 13;
int lightningB = 12;
int boat = 11;
int seaM = 10;
void setup() {
// put your setup code here, to run once:
pinMode(lightningA, OUTPUT);