An Arduino is a popular open-source single-board microcontroller. Learn how to program one and let your imagination run wild.
There are several different varieties of Arduino microcontrollers. The Arduino UNO is the most popular, although there are more options. Before you start developing, do some research to determine which version is the best fit for your project. Astronomers may have an origin story for ‘The Cow,’ a mysteriously powerful cosmic blast
To get started, download and install the Arduino Programmer (also known as the integrated development environment) (IDE).
Connect your Arduino to your computer’s USB port. This may require a specific USB cable. If you’re using different Arduinos, you’ll need to adjust the port because each one has a separate virtual serial-port address.
In the Arduino Programmer, select the board type and serial port.
Test the microcontroller by using one of the preloaded programs, called sketches, in the Arduino Programmer. Open one of the example sketches, and press the upload button to load it. The Arduino should begin responding to the program: If you’ve set it to blink an LED light, for example, the light should start blinking.
To upload new code to the Arduino, either you’ll need to have access to code you can paste into the programmer, or you’ll have to write it yourself, using the Arduino programming language to create your own sketch. An Arduino sketch usually has five parts: a header describing the sketch and its author; a section defining variables; a setup routine that sets the initial conditions of variables and runs preliminary code; a loop routine, which is where you add the main code that will execute repeatedly until you stop running the sketch; and a section where you can list other functions that activate during the setup and loop routines. All sketches must include the setup and loop routines.
Once you’ve uploaded the new sketch to your Arduino, disconnect it from your computer and integrate it into your project as directed.