In the Arduino world, programs that you upload to the microcontroller are called sketches. You can write these sketches in a free integrated development environment (IDE) which can be downloaded from here: https://www.arduino.cc/en/Main/Software
Once you finalize a program, you upload it to your Arduino board using the upload button on the IDE and voila: your board starts doing what you asked it to do.
Every Arduino sketch will have two methods where you get to define the logic of your program:
- setup(): For one-time initialization
- loop(): For things that the board keeps doing forever until it runs out of power
Here's the code that we upload to the Arduino (see 9.13.arduino_sketch.ino):
const int triggerPin = 8; ...