Arduino Tutorial 11: Variables & Data Types

1 Просмотры
Издатель
Interested in Arduino & microcontrollers? Get FREE access to Arduino Academy: https://www.circuitcrush.com/lp/arduino-academy/

Want to be awesome? Then support Circuit Crush on Patreon! https://www.patreon.com/circuitcrush

Variables and data types are very important concepts in Arduino, microcontrollers and programming in general.

Let's take a look at what exactly a variable is in the land of Arduino.

After that, we'll go over the data types allowed in Arduino (like integers, longs, floats and more) and talk about their uses and limitations.

Setting a variable equal to something is referred to as initializing the variable and it’s optional. Sometimes you know ahead of time what the initial value of your variable will be, sometimes you don’t.

In Arduino, we initialize variables with a single equal sign (=), which is called the assignment operator. Note that the assignment operator IS NOT the same thing as the equal sign (which in Arduino is ==, not =).

The point: variables consist of a data type and a name. Initializing a variable is optional.

There is another important point to note before we move on and talk about specific types of variables and what they’re good for.

There are certain words or “names” that are off limits. These are usually keywords that the Arduino IDE reserves for its own use. We'll go over these in the video.

About Us: This tutorial and the others was created by Circuit Crush. Our mission is to teach the masses about electronics, microcontrollers, programming, and all things techy.

Visit us at https://circuitcrush.com
Комментариев нет.