background image

// The loop routine runs over and over again forever:
void loop() 
{
  // Read analog inputs (do the round robin)
  DoDrawbar(ADCcnt, analogRead(ADCmap[ADCcnt]));
  if (++ADCcnt > 8) ADCcnt = 0;

  // Read Button
  if (digitalRead(BUTTON) == LOW)
  {
    if (debounce_timer > 0) --debounce_timer;
  } else {
    debounce_timer = DEBOUNCE_TIME;
  }
  
  if (debounce_timer == 2) 
  {
    mode = !mode; // Reverse
    set_mode(); // and Set!
  }
}

PLEASE NOTE: before compiling the sketch, make sure you have installed the
required libraries (see next chapter).

Connect the D9U to your comptuer using the provided USB cable, start the
IDE, load the sketch, then:

1. From the TOOLS menu, select BOARD -> Arduino Leonardo;

2. From the TOOLS menu, make sure the selected PORT points to Leonardo;

3. Click the icon with the arrow pointing right, this will compile the

sketch and upload it to the board.

PLEASE NOTE: once the sketch is properly uploaded to the board, the USB
port will not be seen by the IDE because it changes its function to USB-
MIDI. To check that it is actually seen as a MIDI device, if you're using
Windows (preferred), download and install the free application MIDI-OX and
check that the ARDUINO MIDI device is listed among your MIDI ports, select
it as an input port to MIDI-OX and check that it is correctly sending the
expected CC messages.

In   case   you   need   to
reprogram   the   board,
one   second   before
clicking   the   "LOAD"
icon   in   the   Arduino
IDE,   you   have   to
"reset"   the   board   by
making   a   contact
between   the   terminals
labeled   RST   and   GND
using

 

a

 

small

screwdriver.

Содержание D9U

Страница 1: ...DRAWBAR CONTROLLER D9U An open source Do it yourself project based on Arduino MOUNTING INSTRUCTIONS...

Страница 2: ...led PREPARATION Prepare a clean and tidy surface with just the required tools handy and make sure you have discharged your body from electrostatic charge by touching some metal object that makes conta...

Страница 3: ...Electronic parts Mechanical parts...

Страница 4: ...sistors bend the terminals 90 degrees and add them to the Main PCB as shown in the pictures below Also add the LEDs pay attention to the polarity and the posisions The shorter lead towards the edge of...

Страница 5: ...and the mini TRS Jack STEP 3 turn the PCB upside down and add the 2x8 DIL strip as shown in the following picture Pay attention to have it set straight on the board or you ll have troubles when coupli...

Страница 6: ...t exceed 350 C 660 F and don t keep the soldering pin on the terminals for too long The SIL strip must face the bottom of the board thus the pins will be soldered on the top side as shown in the pict...

Страница 7: ...PU board the final assembly should look like the picture below Now take your cutters and cut the exceeding terminal strip leads on the JACK side as shown below Optionally you can also cut the exceedin...

Страница 8: ...6 black screws must be set to the right side of the drawbar board as shown here below Then insert the spacers on the other side add the main board and fix the bolts using your fingers to hold the bolt...

Страница 9: ...STEP 8 Use 18 out of the 22 M3X4 black screws to fix the drawbars to the metal bottom piece as shown in the picture sequence below...

Страница 10: ...assembly to the drawbars and solder the DIL terminals Slide the boards slighly angled so the MicroUSB connector can easily pass through the hole in the metal panel STEP 10 Solder all drawbar terminals...

Страница 11: ...astic drawbar caps First set them in position using the following color sequence BROWN BROWN WHITE WHITE BLACK WHITE BLACK BLACK WHITE Once done turn the whole assembly upside down and fix them using...

Страница 12: ...2 Put the metal top cover In order to have the jack connector easily pass through the hole in the metal panel start from an angle from the connector s side Use the remaining 4 M3X4 screws to close the...

Страница 13: ...DCs Sends MIDI CC numbers 12 20 or 21 29 according to selected mode Last update July 2018 This is where you can define your CC numbers for the Bank 0 or 1 int CCMap 2 9 12 13 14 15 16 17 18 19 20 Uppe...

Страница 14: ...DoDrawbar int d int value Get difference from current and previous value int diff abs value prev_val d Exit this function if the new value is not within the deadband if diff DEADBAND return Store new...

Страница 15: ...e the selected PORT points to Leonardo 3 Click the icon with the arrow pointing right this will compile the sketch and upload it to the board PLEASE NOTE once the sketch is properly uploaded to the bo...

Страница 16: ...CC bank into the internal EEPROM The loop function cycles through the 9 ADCs by reading their current values and storing them into an array the same function also listens whether the push button has b...

Страница 17: ...URL https www midi org articles old updated how to make your own 3 5mm mini stereo trs to midi 5 pin din cables The D9U uses TYPE B Use a 5V cellphone USB Charger PSU to power the D9U and use your ada...

Отзывы: