Home Chapter 7 MIDITRON Lighting an LED with a switch
MIDITRON Lighting an LED with a switch

In this tutorial you will use a switch to turn an LED on and off. This will be wired through the miditron board and controlled with MAX MSP and Jitter code. 

Parts necessary:

1) breadboard mountable micro switch NO (normally open)
2) LED
3) connector wires
4) 1-470 Ohm resistor
5)  1- 10K ohm resistor






Place the short lead of the LED into one of the breadboard rows. 
Place the longer lead into a separate row. 

Notice the common ground at the top image of the breadboard.

2. Button:

The ideal spot for the button with four prongs is across the middle gap in the board, with two prongs on one side and two on the other. Be sure to test the prongs to see which two prongs are connected to each other using the continuity test. To test, put a multimeter’s dial on the beeping function (continuity) and then place the two ends of it on two of the buttons prongs and press the button.

 If the multimeter beeps when the button is pressed and the meter is activated you have then activated the switch you and you know you have a normally open switch.  If not, try another set of two prongs until you confirm the switching action. 


3. Wires:

Select a yellow wire and put one end of it into Channel 1. The second end of it should be placed in the same row as the LED’s long pin.

Select another yellow wire and place it in Channel 2.Take the other end of it and place it in the same row as one of the prongs of the button.

Select a green wire to put into the Gnd Channel (Meaning Ground). The second end of the brown wire should go into one of the blue – (negative), vertical rows.

Select a red wire to go from the + Miditron port to the row with a prong from the button. The correct prong should be the one that is diagonal from the prong that has the yellow wire in it.


4. Resistors:

Place the 100 ohm resistor in the button prong adjacent to the red wire, the other end of it should go into the negative, vertical, blue row.

The final step is to place a 470 ohm resistor in the same row as the negative pin of the LED and the other end in the vertical row with the brown wire.


Circuit Materials:


  1. one LED light
  2. one four prong button
  3. 4 wires (preferably one darker and three lighter)
  4. One 470 ohm resistor
  5. One 100 ohm resistor




Set up Miditron Programmer as illustrated below. Change the Midi in and out port to the appropriate option for the Miditron (E-Mu XMidi1X1 Tab Out). The first two ports should be on, the first to digital in the second to digital out. The Channel-off should be on 1 and the second Channel should be on 2 (both matching their ports). Poly pressure should be selected for both the Command-off and Comman. The Pressure-low for Channel 2 should be on 1. The Channel-o should be on 1. For Command-o select Poly pressure. Channel 2's polarity should be positive. Finally put the Pressure on Channel 1 to 1.   Remember to match the channels to the pins you are using on the microcontroller if they differ from the example.


Next go to the Max Patch and create a new patch identical to the one shown below in the book. Click on the polyout and polyin boxes once the patch is locked and make sure E-MU XMidi1x1 Tab Out is selected, otherwise the signals will not connect to the Miditron software. The polyout AND polyin channel should match that of it’s counter part in the Miditron program.


Finish by clicking the button on your breadboard to turn on your LED.