User:Chattons2/ENES100/PROJECT deux

=Week 0=

Project preferences

 * Beat-Bearing (implement)
 * Vision base object tracking
 * Bionic tripod manipulation

Problem Statement
This month, our goal is to complete the next steps of the beat bearing project!

Project Plan
Here is a list of the next tasks for this project:

Overall Package
 * Working of designs and drawings to create system and packaging design

Arduino/MIDI
 * Learning how to use arrays and serial monitor
 * Determine what instrument sounds to use for project
 * Write code for user controls

Washer Input System
 * Gather materials for creating washer systems (i.e. washers, glue, wire)
 * Make sure washer system design is working during board construction

Board Construction
 * Use acrylic glue to attach plexiglass runners to plexiglass board
 * Correctly space plexiglass runners and washer system rows on the board

Google SketchUp/3D Printing/ Washer Template
 * Redesign SketchUp drawing of washer template to fit washer halves

Wiring
 * Create wiring harness
 * Figure out best how to connect washer systems to FPGA

Processing
 * Make processing code look like video
 * Write code for saving and loading songs

My group and me will try to complete as many steps as possible in the course of three weeks. We will start with the "washer input system" and "Overall Package" steps. Next, we will re-design the template to fit the washers and complete the "wiring step". After all that has been taken care of, we will then begin working with the Arduino/shield

NOTE:

☮ ☮ ☮ ☮ WE DID NOT COME UP WITH THIS LIST, WE GOT IT FROM THE PREVIOUS GROUP'S REPORT which can be found HERE! ☮ ☮ ☮ ☮

=Week 1 Narrative= My task this week was to read old documentations of the beat bearing project on professor Foerster's wikiversity page and to figure out what the next step(s) were. I spoke with professor Foerster to get more information about what the last group had already done while the other members of my group spoke with a student who worked on this project last semester. Moreover, we were able to find a box which contained materials that the previous group had left. With those, we will be able to figure out what we need to buy next as well as what we will need to improve.

Here is a list of some of the things we found:  File:Holes.JPG|PlexiGlass with Holes in it File:Ballbearingwasher.JPG|Ball bearing File:Zapagapglue.JPG|Zap-a-Gap File:Two washer templates printed from MakerBot.JPG| These templates were too big, we will need to re-design them.  In that box, we also found that they left us different ideas on how we can place the washers on the plexiglass:  File:Bothhalvesofwasherswithzapagapglue.JPG| They glued halves of washers File:Washerwiringcrimps.JPG|They also drilled holes to test if it would work 

So far we will need more plexiglass, some wires, and better templates.

=Week 2 Narrative= my task this week was to find the Arduino codes we needed as well as a wiring diagram. I noticed that the previous group had already found a code that seemed to work but I was not able to test it because the piano is currently not working. Instead, I attempted to find a code that would allow a reaction as we placed the ball on a washer. I found two codes online and tested them but they did not work, I kept getting an error message. so I thought it would be best if I write my own code; I started writing it but I am not finished.

As for the wiring diagram, I was able to find one on makezine.com

http://cdn.makezine.com/make/17/BB_electronics.pdf

=Week 3 Narrative= This week I learned about arduino codes and how they work. I had two tasks:

to figure out how the washers worked and to write an arduino code for the knobs and buttons on the MIDI shield.

For the first task, I decided to use the washer as a switch that would turn an LED on and off. Since I did not find a code online, I attempted to write my own code. I tried to learn how to write codes from arduino websites and wrote one but it did not work. I kept on modifying it and testing it again but it still did not work. The LED was on and when I placed the washer on the washer plate, the LED went off. At first I thought my code had worked but then i realized that I was just cutting off the current (cutting off current can harm the arduino) because nothing was showing up on the serial port.

HERE is a video; I was testing the first code I wrote.

I then used an example from the ardunino software, StateChangeDetection, and I modified it. It was much easier (it took about fifteen minutes) and it worked! As I placed the washer on the washer plate, the LED turned on, as expected. When I removed it, the LED went off.



HERE is a video, I was testing the final code.

The second task was challenging. I wanted for the two knobs to control the volume and speed, and for the three buttons to control the switch (music on and off), the timbre, and the pitch. My plan was use the code that the previous group had written and just modify it. I figured that if I got one potentiometer to work (the one controlling the speed) then it will be easy to get the others to work as well. At the beginning of the school year, I did my arduino mini-project using LEDs and a potentiometer. I was able to use it to control the speed at which the LEDs blinked. So I thought that I could write a similar code and control the speed of the notes. I did that and added it to the original code (using a different arduino) but it did not work. I think it did not work because that original code was written so that the volume, pitch, and cmd would be on a permanent range (so that they would not need to be controlled). I think that the best way to get the potentiometer to control the speed would by writing a completely different code. Therefore, I am now starting from scratch; I am using a different arduino (so that I don't erase the work that the old group had done). I looked up simple, short drums beats that I will use for the experiment. My new goal is to try to get one knob to control the speed of the drum beats like I got the potentiometer to control the speed of the blinking LEDs. I am still working on that.

=Week 4 Narrative= One of my tasks this week was to control the speed of a beat from the MIDI board with a potentiometer. I was able to accomplish it. Here is the code I used: /* MIDI note player */ int potPin = 0;   // select the input pin for the potentiometer int ledPin = 13;  // select the pin for the LED int val = 0;      // variable to store the value coming from the sensor void setup { // Set MIDI baud rate: Serial.begin(31250); // pinMode(ledPin, OUTPUT);  // declare the ledPin as an OUTPUT } void loop{ //Note on channel 1 (0x90), some note value (note), middle velocity (0x45): noteOn(0x90, 0x43, 0x45); delay(100); //Note on channel 1 (0x90), some note value (note), silent velocity (0x00): noteOn(0x90, 0x23, 0x00); delay(100); val = analogRead(potPin);   // read the value from the sensor digitalWrite(ledPin, HIGH); // turn the ledPin on  delay(val);                  // stop the program for some time digitalWrite(ledPin, LOW);  // turn the ledPin off delay(val);                 // stop the program for some time } // plays a MIDI note. Doesn't check to see that // cmd is greater than 127, or that data values are  less than 127: void noteOn(int cmd, int pitch, int velocity) { Serial.write(cmd); Serial.write(pitch); Serial.write(velocity); }

Like before, I started with examples from the arduino software. I merged two codes together and modified them to get the results that I wanted. The examples I used were the MIDI code which can be found HERE and the analogInput code which I found HERE

This VIDEO shows the results.

My next step is to modify the code again in order to control the volume and the pitch as well.