II.2.2. Compile, Upload, and Run The Example Sketch
Connecting The Pedal
Before compiling and uploading the compiled sketch, the pedal should be connected to the PC/laptop:
- Connect the PC/laptop to the pedal using USB-to-TTL cable or converter.
- On the Arduino IDE, go to menu Tools > Port and select the correct port (which is associated with the USB-to-TTL cable/converter.
Compiling and Uploading
To compile ad upload the compiled sketch, follow these steps:
- Switch off the pedal (turn the ON/OFF switch to OFF position)
- Turn the MIDI/S.TTL switch to OFF position.
- Turn the PROG/RUN switch to PROG position.
- Turn on the pedal (turn the ON/OFF switch to ON position)
- Turn the MIDI/S.TTL switch to S.TTL position.
- Click the menu Sketch > Upload.
The IDE will compile the sketch and if there’s no error then it will upload to the pedal. If one or more error message is generated then it will stop and we have to correct the codes and run the Sketch > Upload menu again.
Running The Pedal
After uploading process has been completed, the IDE will try to reset and run the pedal, but the pedal will just getting halted and need to be manually restarted:
- Power off the pedal (turn the ON/OFF switch into OFF position)
- Turn the PROG/RUN switch into RUN position
- Power on the pedal (turn the ON/OFF switch into ON position)
Now the pedal will run the program (the compiled sketch), and depending on the application, you might need to turn the MIDI/S.TTL swicth to MIDI position if the program uses the MIDI features.