Arduino: 1.6.10 (Windows 10), Board: “Arduino/Genuino Uno”

C:\Users\Shubha Sanket\Documents\Arduino\midisketch\midisketch.ino: In function ‘void loop()’:

midisketch:53: error: ‘midiUSB’ was not declared in this scope

midiUSB.sendNoteOn(60+i, 127, CHANNEL);


midisketch:61: error: ‘midiUSB’ was not declared in this scope

midiUSB.sendNoteOff(60+i, 0, CHANNEL);


exit status 1
‘midiUSB’ was not declared in this scope

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

midisketch.ino (2.03 KB)

My guess is that you need to uncomment these two lines

  // MIDI.begin();


Please include small sketches in the post itself using code tags.

** **[code]** **

paste your code after that
** **[/code]** **
after that

A lot easier for people using a tablet / phone instead of a PC