Don't wanna be here? Send us removal request.
Video
tumblr
***Original video did not post properly from bad computer***
#include <ESP8266WiFi.h> #include <ThingerESP8266.h>
#define USERNAME "henegarwilliam" #define DEVICE_ID "thing" #define DEVICE_CREDENTIAL "5X3cwiACfIHY"
#define SSID "hampguest" #define SSID_PASSWORD "" #define RELAY D1
ThingerESP8266 thing(USERNAME, DEVICE_ID, DEVICE_CREDENTIAL);
void setup() { pinMode(BUILTIN_LED, OUTPUT); pinMode(RELAY,OUTPUT);
thing.add_wifi(SSID, SSID_PASSWORD);
// digital pin control example (i.e. turning on/off a light, a relay, configuring a parameter, etc) thing["led"] << [](pson& in){ digitalWrite(BUILTIN_LED, in ? HIGH : LOW); digitalWrite(RELAY, in ? HIGH : LOW); };
// resource output example (i.e. reading a sensor value) thing["millis"] >> outputValue(millis());
// more details at http://docs.thinger.io/arduino/ }
void loop() { thing.handle(); }
0 notes
Link
Code in Video:
#include <Audio.h> #include <Wire.h> #include <SPI.h> #include <SD.h> #include <SerialFlash.h> // GUItool: begin automatically generated code AudioInputI2S i2s1; //xy=52,192 AudioEffectBitcrusher bitcrusher1; //xy=127,288 AudioEffectReverb reverb1; //xy=197,357 AudioOutputI2S i2s2; //xy=387,421 AudioConnection patchCord1(i2s1, 0, bitcrusher1, 0); AudioConnection patchCord2(bitcrusher1, reverb1); AudioConnection patchCord3(reverb1, 0, i2s2, 0); AudioControlSGTL5000 sgtl5000_1; // GUItool: end automatically generated code //Bitcrusher int current_CrushBits = 16; int current_SampleRate = 44100; void setup() { Serial.begin(9600); AudioMemory(13); sgtl5000_1.enable(); sgtl5000_1.volume(0.7); bitcrusher1.bits(current_CrushBits); bitchrsher1.sampleRate(current_SampleRate); } void loop() { int knob = analogRead(A3); int knob2 = analogRead(A4); int BitCrusher1 = (int)knob/ 68.3 ; //1024 divided by 68.3=15 16-15=1=min bits float Reverb1 = (float)knob2/128.0; //max reverb time 1024/128= 8 seconds bitcrusher1.bits(current_CrushBits - BitCrusher1); bitcrusher1.sampleRate(current_SampleRate); reverb1.reverbTime(Reverb1); }
Bill Of Materials:
L7805 Voltage Regulator
(5) Electrolytic Recoupling Capacitors 10uF/25V
LM358 Tru-Hole Op-Amp
(2) Rotary Potentiometers 10kΩ
(2) Knobs ^^^
Teensy Audio Board
Teensy 3.2
(2) 10kΩ Resistors
(2) 22kΩ Resistors
(2) 100kΩ Resistors
(2) 1MΩ Resistors
(2) ¼” TRS Jacks
(1) 9V power input
<3m Connecting Wires
Solder
Soldering Iron
Large Breadboard
Cardboard Box
0 notes
Text
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h> // GUItool: begin automatically generated code
AudioInputI2S i2s1; //xy=52,192
AudioEffectEnvelope envelope1; //xy=147,285
AudioEffectReverb reverb1; //xy=197,357
AudioOutputI2S i2s2; //xy=387,421
AudioConnection patchCord1(i2s1, 0, envelope1, 0);
AudioConnection patchCord2(envelope1, reverb1);
AudioConnection patchCord3(reverb1, 0, i2s2, 0);
AudioControlSGLT5000 sglt5000_1;
// GUItool: end automatically generated code void setup() {
Serial.begin(9600);
AudioMemory(8);
sgtl5000_1.enable();
sgtl5000_1.volume(0.5); } void loop() {
int knob = analogRead(A3);
int knob2 = analogRead(A4) float envelope1 = (float)knob / 1023.0;
float reverb1 = (float)knob2/1023.0;
}
0 notes
Text
William Henegar
Professor Thea Rae
Arduino for Everyone
4/18/2017
Guitar Pedal Project Proposal
For my final project in Arduino for everyone, I would like to make a guitar pedal with programable effects. Initially, my goal is to make a distortion pedal. If/when that gets working, I can expand my range of effects to any level of complexity.
One reason I like this as a final project is because I am very interested in sound and the way computers process it. Prior to my interest in Engineering, I planned to make music my career, and was always deeply impressed by the monumental range of sounds that can be produced synthetically by computers, as well as the degree to which one can modify and shape existing sounds by running them through similar software. This project, and the resulting audio interface it creates, will give me a great deal of insight into how such programs work, the amount of detail that can be achieved in a particular effect if the person knows what they are looking to create, and also leave me with a reprogrammable model to work with and improve my skills moving forward.
Secondly, I will use a Teensy 3.2 to create this pedal, which is not an Arduino, but is Arduino compatible. This audio board is far more powerful than the Arduino, and is one of the most commonly used pieces of technology in home-made audio equipment, synths, etc. A Teensy-based guitar pedal is an excellent introductory option for working with the Teensy.
In addition to this, the circuitry of the guitar pedal design kit I am basing mine off of is quite complex. Although I am essentially replicating an open-source schematic to create the pedal itself, the intricacy of the design will provide ample room to learn, grow, and probably fry some components in the process.
Bill Of Materials:
L7805 Voltage Regulator
(5) Electrolytic Recoupling Capacitors 10uF/25V
LM358 Tru-Hole Op-Amp
(5) Rotary Potentiometers 10kΩ
(5) Knobs ^^^
Teensy Audio Board
Teensy 3.2
(2) 10kΩ Resistors
(2) 22kΩ Resistors
(2) 100kΩ Resistors
(2) 1MegaΩ Resistors
(2) ¼” TRS Jacks
(1) LED
(1) 9V power input
(1) 3 Pole Double Throw Stomp Switch (Heavy Duty)
(1) Sparkfun Protopedal breadboard
3m Connecting Wires
>.3 m^2 Steel Sheeting
Solder
Soldering Iron
Pliers
0 notes
Text
#define NOTE_B0 31 #define NOTE_C1 33 #define NOTE_CS1 35 #define NOTE_D1 37 #define NOTE_DS1 39 #define NOTE_E1 41 #define NOTE_F1 44 #define NOTE_FS1 46 #define NOTE_G1 49 #define NOTE_GS1 52 #define NOTE_A1 55 #define NOTE_AS1 58 #define NOTE_B1 62 #define NOTE_C2 65 #define NOTE_CS2 69 #define NOTE_D2 73 #define NOTE_DS2 78 #define NOTE_E2 82 #define NOTE_F2 87 #define NOTE_FS2 93 #define NOTE_G2 98 #define NOTE_GS2 104 #define NOTE_A2 110 #define NOTE_AS2 117 #define NOTE_B2 123 #define NOTE_C3 131 #define NOTE_CS3 139 #define NOTE_D3 147 #define NOTE_DS3 156 #define NOTE_E3 165 #define NOTE_F3 175 #define NOTE_FS3 185 #define NOTE_G3 196 #define NOTE_GS3 208 #define NOTE_A3 220 #define NOTE_AS3 233 #define NOTE_B3 247 #define NOTE_C4 262 #define NOTE_CS4 277 #define NOTE_D4 294 #define NOTE_DS4 311 #define NOTE_E4 330 #define NOTE_F4 349 #define NOTE_FS4 370 #define NOTE_G4 392 #define NOTE_GS4 415 #define NOTE_A4 440 #define NOTE_AS4 466 #define NOTE_B4 494 #define NOTE_C5 523 #define NOTE_CS5 554 #define NOTE_D5 587 #define NOTE_DS5 622 #define NOTE_E5 659 #define NOTE_F5 698 #define NOTE_FS5 740 #define NOTE_G5 784 #define NOTE_GS5 831 #define NOTE_A5 880 #define NOTE_AS5 932 #define NOTE_B5 988 #define NOTE_C6 1047 #define NOTE_CS6 1109 #define NOTE_D6 1175 #define NOTE_DS6 1245 #define NOTE_E6 1319 #define NOTE_F6 1397 #define NOTE_FS6 1480 #define NOTE_G6 1568 #define NOTE_GS6 1661 #define NOTE_A6 1760 #define NOTE_AS6 1865 #define NOTE_B6 1976 #define NOTE_C7 2093 #define NOTE_CS7 2217 #define NOTE_D7 2349 #define NOTE_DS7 2489 #define NOTE_E7 2637 #define NOTE_F7 2794 #define NOTE_FS7 2960 #define NOTE_G7 3136 #define NOTE_GS7 3322 #define NOTE_A7 3520 #define NOTE_AS7 3729 #define NOTE_B7 3951 #define NOTE_C8 4186 #define NOTE_CS8 4435 #define NOTE_D8 4699 #define NOTE_DS8 4978
int melody[] = { NOTE_D6, NOTE_D6, NOTE_D6, NOTE_D6, NOTE_D6, NOTE_D6, NOTE_D6, NOTE_D6 }; int noteDurations[] = { 1, 1, 1, 1, 1, 1, 1, 1 };
char cache; String inputString = ""; void setup() { Serial.begin(9600); pinMode(13, OUTPUT); pinMode(8, OUTPUT); pinMode(7, OUTPUT); pinMode(4, OUTPUT);
// put your setup code here, to run once:
}
void loop() { if (Serial.available()) { while (Serial.available()) { char inChar = (char)Serial.read(); inputString += inChar; } Serial.println(inputString); while (Serial.available() > 0) { cache = Serial.read(); } if (inputString == "a") { digitalWrite(13, HIGH); for (int thisNote = 0; thisNote < 4; thisNote ++) { int noteDuration = 1000 / noteDurations[thisNote]; tone(8, melody[thisNote], noteDuration); int pauseBetweenNotes = noteDuration * 1.70; delay (pauseBetweenNotes); noTone(8); digitalWrite(4, HIGH); digitalWrite(7, HIGH); } } else if (inputString == "b") { digitalWrite(13, LOW); digitalWrite(8, LOW); digitalWrite(4, LOW); digitalWrite(7, LOW); } inputString = ""; } } // put your main code here, to run repeatedly:
0 notes
Text
7 LEDs Array Flashing Even/Odd Pins w/ Potentiometer Code
int LedPin[] = {13, 12, 11, 10, 9, 8, 7};//array length=6 int SENSORPIN = A0;
void setup() { for (int i = 0; i < 7; i++) { pinMode(LedPin [i], OUTPUT); } Serial.begin(9600); } void loop() { int sensorVal = analogRead(SENSORPIN); Serial.println(sensorVal); delay(15); if ((sensorVal >= 0) && (sensorVal < 657)) { for (int i; i < (sizeof(LedPin) / sizeof(int)); i++) { if (i % 2 == 0) {//no semicolon// digitalWrite(LedPin[i], HIGH); delay (100); digitalWrite(LedPin [i], LOW); } else { digitalWrite (LedPin [i], LOW); } } } else if ((sensorVal >= 657) && (sensorVal <=1023)) { for (int i; i < (sizeof(LedPin) / sizeof(int)); i++) { if (i % 2 != 0) {//no semicolon// digitalWrite(LedPin[i], HIGH); delay (100); digitalWrite(LedPin [i], LOW); } else { digitalWrite (LedPin [i], LOW); } } } }
0 notes
Video
tumblr
7 LEDs Array Flashing Even/Odd Pins w/ Potentiometer
0 notes
Text
3 LED’s Blinking w/ Potentiometer Code
int SENSORPIN = A0; int BLUELED = 13; int REDLED = 12; int GREENLED = 11; long previousMillis = 0; long interval = 1000; int ledState = LOW; void setup() { pinMode(BLUELED, OUTPUT); pinMode(REDLED, OUTPUT); pinMode(GREENLED, OUTPUT); Serial.begin(9600); }
void loop() { LedTurnOn(); unsigned long currentMillis = millis(); if(currentMillis - previousMillis > interval) { //save the last time you blinked the LED previousMillis = currentMillis; if (ledState == LOW) ledState = HIGH; else ledState = LOW; digitalWrite(BLUELED, ledState); digitalWrite(REDLED, ledState); digitalWrite(GREENLED, ledState); } }
void LedTurnOn () { int sensorVal = analogRead(SENSORPIN); Serial.println(sensorVal); delay(15); if ((sensorVal <= 700) && (sensorVal >= 300)) { digitalWrite (BLUELED, HIGH); digitalWrite (REDLED, LOW); digitalWrite (GREENLED, LOW); Serial.println("blueled"); } else if ((sensorVal < 300) && (sensorVal > 100)) { digitalWrite (BLUELED, LOW); digitalWrite (REDLED, HIGH); digitalWrite (GREENLED, LOW); Serial.println("redled"); } else if ((sensorVal > 0) && (sensorVal < 100)) { digitalWrite (BLUELED, LOW); digitalWrite (REDLED, LOW); digitalWrite (GREENLED, HIGH); Serial.println("greenled"); } }
0 notes
Video
tumblr
The sensor is only reading values in a very limited range, so only the blue light is wirking
0 notes
Video
tumblr
3 Led's + potentiometer + Flashing (Code in seperate post)
0 notes