Skip to content

Instantly share code, notes, and snippets.

{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 7,
"minor" : 3,
"revision" : 5,
"architecture" : "x64",
"modernui" : 1
}
//Alan Tett and Abby Rinerson
//ATLS 3300 Object, Spring 2019
//Final project
#include <CapacitiveSensor.h>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
//Alan Tett, ATLS 3300 Object
//Lab 5 - Serial Communication
//4/2/19
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 8
/*
This P5 sketch is a template for getting started with Serial Communication.
The SerialEvent callback is where incoming data is received
By Arielle Hein, adapted from ITP Phys Comp Serial Labs
Edited by Alan Tett April 2 2019
//Alan Tett, Object Spring 2019, Lab 4 part 3
//much of the code for this part came from: https://www.arduino.cc/en/Tutorial/StepperOneRevolution
#include <Stepper.h>
//from the stepper motor's data sheet
const int stepsPerRev = 513;
//initialize stepper
Stepper myStepper(stepsPerRev, 8, 9, 10, 11);
//Alan Tett, ATLS 3300 Object, Spring 2019
//Lab 4 part 2
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() {
//establish serial communication
//Alan Tett, ATLS 3300 Object, Spring 2019
//Lab 4, part 1
#include <Servo.h>
//initialize servo and associated vars
Servo servo;
int servoPin = 6;
float phoVal;
int angle;
@alte9415
alte9415 / Lab3_3
Created February 19, 2019 03:27
Alan Tett, ATLS 3300 Object, Lab 3 Part 3
#include "volume2.h"
Volume vol;
//initialize vars
int sliVal;
int potVal;
float freq;
int gain;
int LED1 = 10;
int LED2 = 9;
@alte9415
alte9415 / Lab3_2
Created February 19, 2019 03:26
Alan Tett, ATLS 3300 Object, Lab 3 Part 2
//initialize vars
int phoVal;
float freq;
void setup() {
//initialize serial comm
Serial.begin(9600);
}
void loop() {
@alte9415
alte9415 / Lab3_1
Created February 19, 2019 03:24
Alan Tett, ATLS 3300 Object, Lab 3 Part 1
int poten = A0;
int slide = A1;
int LED1 = 10;
int LED2 = 9;
void setup() {
Serial.begin(9600);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
}