Thursday, 4 December 2014

Prototype

Here is the finished Prototype. This blog post is to present evidence of that. Below you will find:

  1. A video showing the Prototype functioning 
  2. A photo of the Prototype Arduino
  3. A copy of the Arduino code text
  4. A copy of the Max Patch code
  5. A Fritz diagram of the Arduino and breadboard layout
1. Video



2. Photo of prototype


3. Arduino Code


//Arduino Code, copy from here

const int ledPin7 = 7; // the pin that the LED is attached to
int ledPin6 = 6;
int ledPin5 = 5;



int incomingByte;      // a variable to read incoming serial data into

void setup() {
  // initialize serial communication:
  Serial.begin(9600);
  // initialize the LED pin as an output:
  pinMode(ledPin7, OUTPUT);
  pinMode(ledPin6, OUTPUT);
}

void loop() {
  // see if there's incoming serial data:
  if (Serial.available() > 0) {
    // read the oldest byte in the serial buffer:
    incomingByte = Serial.read();
    // if it's a 48 (Middle C), turn on the LED:
    if (incomingByte == 48) {
      digitalWrite(ledPin7, HIGH);
    } 
    // if it's anything else, turn off the LED:
    else {
      digitalWrite(ledPin7, LOW);
    }
    if (incomingByte == 50) {
      digitalWrite(ledPin6, HIGH);
    }
    else {
      digitalWrite(ledPin6, LOW);
    }
    if (incomingByte == 52) {
      digitalWrite(ledPin5, HIGH);
    }
    else {
      digitalWrite(ledPin5, LOW);
    }
  }
}

// to here

-----------------------------------------------------------------------------------------------------------------------

4. Max Patch

<pre><code>
----------begin_max5_patcher----------
681.3oc4WkraaCCD8rCP9GDzYWCtnM1a86nnHPxl0gA1TBTzotMn+6kKRVLI
PKznRtA8hnmgKZdu4wQie496VEVTdlVGF74fuFrZ0KJOqL9zdV05XU3w7yaO
jWaVXHm9ixhmBW2LmjdVZ7WSEr7CAaCHI.vko+dIWxyORMK4K5UbYJ9oikmj
GnRy4hZcWkK29Hiu+AAcqzFZXvFv5.TbrdHkXLTtB9V6dX6LmuJt9Dp6caOc
4Oqn1iIjwkgqCBC61nJFX71P.5Fz0reY1FDsAXb+66uSOpFVOYt5HstNeO88
jUVl+LDb.FhXXHHwvPwVirdXHXR+LTeTCZ4nlnz+tTC1GpI5eApo3jTVxudn
ZAIBL38DHpenVjy226kjkGVDefEXogUu0CkBVEuTRmiZgPfUNmNHYjMZoP8v
hoqUGeAULGzQh4IdXoQWckpbg58JohGn77hClH.LFUMn54CAWkFOYtJ9+ctB
hltvB+ghr5obktREi6OIhmv2izOiRFtt8jJUMbEqoRV1sGdfweWuuFPnm3MT
Xc4Iw11.pozZ.rKN1QqkLdtjo9.W2hzcZ4tpGY61Q4uRTbjsqpTgol.IMcSr
t+DKwo3uVKmWEqVKsLT2.x.uPBXTjD4KRvDSris8rCtXbqAB50qZx.AYzuNF
yKPFWaA7EHMZKaFgPVfLhQ0LZJAAttTBBi0CNFyHRPS9Vx0HtRgNhKswLhDv
jPRhuHg3hDxhfjo.jrqKiDE67kKmea+qH10P.yM5fSAcdUUNF2gnTza+MDXF
ZJTnMtwYuzqK6gcpUiSt4YoXeQgaVJKpUONun.MFJv9hhjDmaRHhevnoGs7p
pmoh5lHwh.U+rOUJz1Iqs1Lt011.Xnf9LqcKYVW4BUuoRUiomD1VZOmDEplw
7BUO9C.X.g4F
-----------end_max5_patcher-----------
</code></pre>

5. Fritz Diagram


No comments:

Post a Comment