> pins 8-12 I assume correspond as follows?
> 8 - lsdj midi slave sync
> 9 - lsdj midi master sync
> 10 - lsdj keyboard mode
> 11 - midi to nanoloop sync
> 12 - mgb
> 13 - status light
its in reverse order, sorry for the confusion. though 13 is status, 12
is slave, 11 is master, 10 is keyboard mode, 9 is nano, 8 is mgb.
>
> Two strange things are going on:
> 1) when I cycle through the modes it always gets stuck on mode 4 (midi
> to nanoloop) and the button press/hold won't let me get out of this
> mode unless I hold reset on the arduino while holding the mode
> button.
if the gameboy wires are not plugged in correctly so that the gb
serial input is not hooked up, the arduino will hang on midi master
mode in this version. (its waiting for a +5v from the gb serial) ...
its kind of a bug, i didnt notice it before because my gb was always
plugged in. :D
if you want to fix the code without having to check your wires first
replace the function "modeLSDJMasterSync" in the Mode_LSDJ_MasterSync
file with this:
void modeLSDJMasterSync()
{
while(1){
readgbClockLine = PINC & 0x01; //Read gameboy's clock line
if(readgbClockLine) { //If Gb's Clock is
On
while(readgbClockLine) { //Loop untill its
off
checkLSDJStopped(); //Check if LSDJ hit
Stop
readgbClockLine = PINC & 0x01; //Read the clock
again
bit = (PINC & 0x04)>>2; //Read the serial
input for song position
setMode();
updateStatusLight();
}
countClockPause= 0; //Reset our wait
timer for detecting a sequencer stop
readGbSerialIn = readGbSerialIn << 1; //left shift the
serial byte by one to append new bit from last loop
readGbSerialIn = readGbSerialIn + bit; //and then add the
bit that was read
sendMidiClockSlaveFromLSDJ(); //send the clock &
start offset data to midi
} else {
setMode();
}
if (Serial.available() > 0) { //If serial data
was send to midi input
incomingMidiByte = Serial.read(); //Read it
Serial.print(incomingMidiByte, BYTE); //Send it to the
midi output
}
}
}
> 2) in mode 1 the arduino recognizes midi in but the only way i know
> this is that the 5th led flashes when i hit a key on my synth (I
> assume the 6th led or the status light should be blinking and not the
> 5th), no other mode recognizes midi in data. The only time the status
> light comes on is when the arduino is powered on.
your in mGB mode, it will blink to midi channels 1 to 4 on the first 4
lights, to each midi channel.
> any ideas and am i supposed to upload each .pde? It looks as if when i
> load Arduinoboy1_1_0.pde it shows all the other included .pde files in
> tabs within the arduino software and I'm guessing they all upload as
> one?
the main file will compile and upload everything. Arduinoboy1_1_0.pde
> I might try diff't resistors on the midi in and out, i may have gotten
> the wrong ones. they are 220hm 2W, heh and I read 1/2 or 1/4 should do
> the trick.
watt doesnt matter, it should be fine.
Best of luck,
Timothy