visavis

Hi, I,ve upladed a sketch succesfully to my arduino uno and I connected a powersupply.However every time a disconnect the USB cable from the arduino it does not remember my sketch.Does anyone have an idea what might be wrong?Thanks, Wybe

Very early on the Uno's bootloader had a situation where it would "forget" the loaded sketch. However that was fixed years before the R3 came out. Something strange must have happened for your official Arduino board to have such an old bug.

As long as you purchased it from an authorized distributor (e.g. not eBay or Amazon), you should be able to return it for a replacement.

visavis

well, i've tried a different arduino and another power supply, but the problem occurs on both arduino's.Then I uploaded a different sketch and the arduino remembered it.So now i think the problem is in the sketch.I'm new at this , does anyone see a problem?Thanks a lot.

if (keyispressed == HIGH){ //the key on the board is pressed digitalWrite(LED, HIGH); //set the LED to on. if(!noteisplaying){ //if the note is not already playing send MIDI instruction to start MIDI.sendNoteOn(36,127,1); // Send a Note (pitch 36 (C2), vel.127 ch. 1) noteisplaying = 1; // set the note playing flag to TRUE } } else{ digitalWrite(LED,LOW); // the key is not pressed. Turn off the LED if(noteisplaying){ //if the note is currently playing, turn it off MIDI.sendNoteOff(36,0,1); // Stop the note noteisplaying = 0; // clear the note is playing flag } }}

visavis

Thanks guys, I bought the arduino's at a shop called Conrad and this is a normal shop in Holland for electronics.The sketch itself works fine, everytime i push the button a midi note is send and played.But always when I remove the usb cable and then put it back,the sketch is gone, and I have to upload it again.I've uploaded the "blink sketch" and when I remove and put back the usb cable the arduino remembers the sketch.Thanks a lot for thinking with me , I don't have a clue.

visavis

It turned out that the lights flashing on the board were not indicating output from the TX pin but output into the USB. Having power cycled if I waited for long enough for the USB Serial to start working on my computer again it flashed as expected. Once I plugged in the MIDI interface I had no problems!

Sorry I can't be of more help.

M

This was exectly the case with me.Everything is working fine now.Again I would like to thank everybody and I want to apologize for your complete waste of time with me,sorry.Wybe