How can I get started with Arduino

hardware Arduino Tutorial: The Very First Steps

display

Never worked with circuits and breadboards? Then you've come to the right place: All steps from the bare Arduino to the running program - without any prior knowledge, without having to write your own code.

Hardware and software

The project for this tutorial is very simple: An LED should light up for 1 second and then stay off for 1 second - in other words, it should flash. Hardware comes in here Arduino Mega 256 used, but the procedure is identical for almost all models. In addition to the board, you will also need the following components: One resistance with up to 1 kiloohm, one LED, two connection cable, a Breadboard and of course one USB connection cable for the board. These things should be in every Arduino entry-level kit. By the way: A breadboard is a breadboard that is used to set up circuits with plugging in instead of soldering.

You can get the Arduino software directly on the homepage, you can safely ignore any CDs from the beginner's sets. The code for the tutorial shown here is supplied directly, as it is largely one of the official beginners tutorials. In the (English-language) Arduino documentation, these are unfortunately a bit superficial for real beginners. In addition, the original does not use the breadboard: Of course, the LED and resistor can also be connected directly to the Arduino board, but with breadboard it is easier and for real, more complex projects you have to be able to handle it anyway.

Build hardware

First, you need the Build circuit: Power from the Arduino flows through the breadboard connector D13 through the resistor, through the LED and back into the board, here of course the GND connection (grounding). The D13 connection is connected to the onboard LED of the Arduino board, which is why the external LED can also be controlled via it.

First connect "GND"on the Arduino board with a "Minus" socket on the breadboard. Briefly for information: In the outer areas with "+" and "-" the connections are longitudinal, in the rest of the area they are transverse. Which slot you choose does not matter - but it is best not to start at the very edge so that there is still room for possible future expansions. Here in the picture it is line 13.

Now connect "D13" with the "Plus" socket next to the "minus" socket just used. This guarantees the power supply.

Now take the LED to hand: A metal pin is a little longer - the Plus pole. This comes in the "a" column of the breadboard (here line 6), the shorter pin in the "Minus" column.

display

So that the current does not flow unchecked through the LED and thus destroy it, comes in now resistance with up to 1 kiloohm into the "Plus" column and in the "b" column in the same row as the LED. The current can now flow from "D13" through the resistor and LED to "GND".

And here the whole thing again at a glance:

Set up software

Now install the Arduino IDE and connect your Arduino board to the computer via USB. This should now be recognized and set up by Windows. Then start "Arduino" from the start menu. First you have to tell the software what kind of Arduino board it is, what you have to say about "Tools / board" establish.

display

Then configure via "Tools / port"the correct connection - usually this is next to the standard"COM1"The only connector specified, labeled with the name of your board. This completes your setup and you can begin programming - or use a ready-made sample code.

Upload program

As promised, you don't need your own code, the flashing LED is already included as a project as a standard example. Open it via "File / Examples / Basics / Blink". The code is extremely simple and well explained, albeit in English - so here again in German:

// The setup function runs once when switching on as a start for each program (sketch).
void setup () {
// D13 (LED_BUILTIN) is set as output.
pinMode (LED_BUILTIN, OUTPUT);
}
// The loop function just runs endlessly.
void loop () {
digitalWrite (LED_BUILTIN, HIGH); // LED voltage is set to high, the LED lights up.
delay (1000); // Waiting time in seconds - the LED continues to light.
digitalWrite (LED_BUILTIN, LOW); // LED voltage is set to LOW, the LED goes out.
delay (1000); // Waiting time in seconds - the LED is still off.
}

display

To activate the program you need to upload what you have about it to the Arduino board [CTRL] + [U] > "Sketch / upload"or the little arrow symbol in the upper left corner of the program window. After a short time you should get a message that the upload has been completed. You don't have to do anything else, the blink sketch should run. With the default values, the LED should be in 1- Every second flashes. You can of course change the values ​​as you wish.

When uploading, many users report error messages, the forums are full of them. The most frequent cause is likely to be an incorrect or forgotten configuration of the port and Arduino board - so check and adjust if necessary. Outdated software could also be responsible, which is why a version from a CD that may be supplied should not be used. You can get more help from "Help / troubleshooting".

What's next?

You now know how to get programs on the Arduino, how to "tap" the Arduino and how such a breadboard works. With this knowledge, you should now be able to imitate most projects on the Internet. Basically, it usually boils down to the fact that you get the finished code and otherwise "only" populate a breadboard. However, this can be quite complex at times. Programs like the "Blink" script used here, called Sketch in the Arduino world, are simple text files with the ending "ino" that are started simply by double-clicking in the Arduino IDE.

Completely own projects are certainly still a few hours away from dealing with the scripting language and basic electronics. We therefore recommend the other sample projects supplied, the "Built-in Examples". Although these are in English, they are so taciturn that you basically only have to adjust the breadboard using the illustration and upload the corresponding sketch.