Skip to content

Instantly share code, notes, and snippets.

View dandrewbarlow's full-sized avatar

Andrew Barlow dandrewbarlow

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Accessible Form Demo</title>
<style>
// Tide Pod Simple Synth
// by Andrew Barlow
// using mozzi library for that advanced sound synthesis
#include <MozziGuts.h>
// oscillator from mozzi library
#include <Oscil.h>
//low pass filter from mozzi
//#include <LowPassFilter.h>
// sine wavetable
// Andrew Barlow
// Object Lab 5
/* LIBRARIES */
#include <Stepper.h>
#define STEPS 2038
Stepper stepVar(STEPS, 8, 9, 10, 11);
// Andrew Barlow
// Object Lab 5
/* GLOBAL VARS / DEFINITIONS */
// button/switch to change motor direction
#define BUTTON 2
// H-Bridge pin 1 (POWER:motor on | GROUND:motor off); uses PWM
#define ENABLEPIN 9
/*
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 March 12 2019
*/
#define input1 A0
#define input2 A1
#define input3 2
#define output 13
void setup() {
// put your setup code here, to run once:
pinMode(output, OUTPUT);
pinMode(input1, INPUT);
#define LEDin A0
#define SPEAKERin A1
#define SPEAKERout 10
#define LEDout 11
void setup() {
// put your setup code here, to run once:
//init pins
#define ANALOGPIN1 0
#define ANALOGPIN2 1
#define LEDPIN1 9
#define LEDPIN2 10
void setup() {
// put your setup code here, to run once:
#define INPIN 5
#define OUTPIN 9
void setup() {
// put your setup code here, to run once:
pinMode(INPIN, INPUT);
pinMode(OUTPIN, OUTPUT);
Serial.begin(9600);
}
@dandrewbarlow
dandrewbarlow / neopixel.ino
Created February 7, 2020 21:11
Arduino Neopixel Control
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?