Digital Electronics Final Project

For my Final Project I created a visual representation of the notes played by my drum sequencer. I paired Processing with Arduino, and sent numbers to Processing whenever a note played on my drum sequencer. Depending on the note, a different colored circle flashes in Processing. Here is the Arduino code: int buttonPins[9] = {14,Continue reading “Digital Electronics Final Project”

Digital Lecture 10

pressCallback and releaseCallback are variable functions. Each one holds a function as a variable. This allows for the flexibility demonstrated in our program today. When we change the onPress and onRelease functions, they are updated in the variable. #include “Button.h” Button buttonOne(36, 0); Button buttonTwo(35, 1); Button buttonThree(34, 2); Button buttonFour(33, 3); int ledPins[4] =Continue reading “Digital Lecture 10”

Digital Lab 09

This is the Arduino code: int potValArray[5] = {0, 0, 0, 0, 0}; int potPinArray[5] = {A18, A17, A16, A15, A14}; int totalPots = 5; void setup() {  Serial.begin(9600); } void loop() {  Serial.write(0);  //Serial.println(0);  for(int i = 0; i < totalPots; i++){    potValArray[i] = analogRead(potPinArray[i]);    potValArray[i] = map(potValArray[i], 0, 1023, 1, 255);    Serial.write(potValArray[i]);    delay(50);Continue reading “Digital Lab 09”

Digital Electronics Lecture 5

The code: unsigned long lastStepTime = 0; int currentStep = 0; int tempo = 0; int switchPinArray[2] = {34, 33}; int ledPinArray[4] = {29, 30, 31, 32}; int totalLEDs = 4; void setup() {  Serial.begin(9600);  for(int i = 0; i < 2; i++){    pinMode(switchPinArray[i], INPUT);  }  for(int i = 0; i < totalLEDs; i++){    pinMode(ledPinArray[i],Continue reading “Digital Electronics Lecture 5”

Design a site like this with WordPress.com
Get started