{"id":32930,"date":"2020-05-29T02:48:25","date_gmt":"2020-05-28T18:48:25","guid":{"rendered":"\/blog\/?p=32930"},"modified":"2020-05-29T13:27:10","modified_gmt":"2020-05-29T05:27:10","slug":"getting-started-with-arduino-data-types","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/","title":{"rendered":"Getting started with Arduino Data Types"},"content":{"rendered":"\n<figure class=\"wp-block-video\"><video autoplay loop muted src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/05\/10-Hacks-Every-Pro-Should-Know.mp4\" playsinline><\/video><\/figure>\n\n\n\n<p>Arduino data types. They play an important role when it comes to programming the Arduino. The Arduino which is a computer is highly data agnostic (it does not know or care in what manner the data it receives was sent to it.)<\/p>\n\n\n\n<p>Without data types, you cannot determine how many bytes of memory are dedicated to that variable, and what kind of data can be stored in the variable which makes data type of the variable important. <\/p>\n\n\n\n<p>A data type can be defined as a classification that describes the value a variable holds and the operations we can perform on it.  Other than variables, functions also have data types depending on the values they return.<\/p>\n\n\n\n<p>In this tutorial, you will learn about all the different data types that you will use when programming your Arduino. The data types are: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>void<\/li><li>boolean<\/li><li>char<\/li><li>Unsigned char<\/li><li>byte<\/li><li>int<\/li><li>Unsigned int<\/li><li>Word<\/li><li>Long<\/li><li>Unsigned long<\/li><li>short<\/li><li>float<\/li><li>double<\/li><\/ul>\n\n\n\n<p>This tutorial will <strong>NOT<\/strong> cover arrays, pointers, or strings as these are more specialized with more underlying concepts. <\/p>\n\n\n\n<p>Without further ado, let us jump right into our first data type, <strong>void<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">void<\/span><\/h2>\n\n\n\n<p><strong>void<\/strong> is only used when declaring functions. It is used to indicate that the function is expected to return no values when they are called. <\/p>\n\n\n\n<p>It is important to note that Setup and Loop functions are of type void and do not return any information as well. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example void code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>void setup()\n{\n    Serial.begin(9600);\n}\nvoid loop()<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">boolean<\/span><\/h2>\n\n\n\n<p>A <strong>boolean<\/strong> holds either one of two boolean values, true or false.  boolean is a non-standard type alias for&nbsp;<code><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/variables\/data-types\/bool\">bool<\/a><\/code>&nbsp;defined by Arduino.<\/p>\n\n\n\n<p>This Arduino Data type has a memory of 8 bit \/ 1 byte.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example boolean code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>int LEDpin = 5;       \/\/ LED on pin 5\nint switchPin = 13;   \/\/ momentary switch on 13, other side connected to ground\n\nboolean running = false;\n\nvoid setup()\n{\n  pinMode(LEDpin, OUTPUT);\n  pinMode(switchPin, INPUT);\n  digitalWrite(switchPin, HIGH);      \/\/ turn on pullup resistor\n}\n\nvoid loop()\n{\n  if (digitalRead(switchPin) == LOW)\n  {  \/\/ switch is pressed - pullup keeps pin high normally\n    delay(100);                        \/\/ delay to debounce switch\n    running = !running;                \/\/ toggle running variable\n    digitalWrite(LEDpin, running);      \/\/ indicate via LED\n  }\n}\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">char<\/span><\/h2>\n\n\n\n<p><strong>char<\/strong> which is short for character, is a data type used to store a character value (A,B,C). When initializing multiple characters it will be written in single quotes (eg. &#8216;A&#8217;) but for strings, they use double quotes (eg.&#8221;ABC&#8221;)<\/p>\n\n\n\n<p>Characters will be stored as numbers. For the specific encoding,  you can refer to the ASCII Chart as shown below. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/pijaeducation.com\/wp-content\/uploads\/2019\/07\/ASCII-code-table.png\" alt=\"Print ASCII CHARACTERS on LCD 16x2 using Arduino \u00bb PIJA Education\" width=\"487\" height=\"482\"\/><figcaption>Ref: <a href=\"https:\/\/pijaeducation.com\/arduino\/lcd-16x2-with-arduino-uno\/print-ascii-characters-on-lcd-16x2-using-arduino\/\">PIJA Education<\/a><\/figcaption><\/figure><\/div>\n\n\n\n<p>As characters will be stored as numbers, you can do arithmetic operations on them using the ASCII value of the character.  The char data type encodes numbers from -128 to 127. <\/p>\n\n\n\n<p>This Arduino data type has a memory of at least 8 bits. You are recommended to use char for storing characters.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example char code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>char myChar = 'A';\nchar myChar = 65; \/\/ both are equivalent<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Unsigned char<\/span><\/h2>\n\n\n\n<p>The <strong>unsigned char<\/strong> datatype encodes numbers from 0 to 255.<\/p>\n\n\n\n<p>This Arduino data type has a memory of 8 bit\/ 1 byte which is similar to the byte datatype. For clarity and consistency of the Arduino programming style, for an unsigned, one-byte data type, the byte data type is recommended.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example Unsigned char code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>unsigned char myChar = 240;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">byte<\/span><\/h2>\n\n\n\n<p>Similar to the unsigned char data type, a<strong> byte<\/strong> encodes an 8-bit unsigned number from 0-255<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example byte code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>byte m = 25 ;\/\/declaration of variable with type byte and initialize it with 25<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">int<\/span><\/h2>\n\n\n\n<p><strong>int<\/strong> which is short for integer is one of the most commonly used data type in Arduino. They are your primary data type for storing numbers.<\/p>\n\n\n\n<p>Do note that int size varies from board to board. For example, in ATmega based Arduino boards like the Uno, Mega and Nano, an int uses 2 byte of memory and as a range of -32,768 to +32,767. While for the Due and SAMD based boards (eg. MKR1000, Zero), int uses 4 byte of memory and as a range of -2,147,483,648 to + 2,147,483,647. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example int code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>int countUp = 0; \/\/creates a variable integer called 'countUp'<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Unsigned int<\/span><\/h2>\n\n\n\n<p>The unsigned int is similar to int in the way that they store a 2-byte value. However, instead of storing negative numbers, they store only positive values with a range of 0 to +65,535.<\/p>\n\n\n\n<p>Same as int, unsigned int size varies from board to board with ATmega based Arduino boards storing a 2-byte value while the Due and SAMD based boards stores a 4 bytes (32-bit) value and has a range of 0 to 4,294,967,295. <\/p>\n\n\n\n<p>The main difference between unsigned int and ints is how the highest bit\/sign bit is interpreted. In the int type (which is signed), if the highest bit is &#8220;1&#8221;, the number is interpreted as a negative number, and the other 15 bits are interpreted with. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example unsigned int code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>unsigned int ledPin = 13;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Word<\/span><\/h2>\n\n\n\n<p>The word data type is very similar to the previous unsigned int data type. On the ATmega based Arduino boards, a word stores a 16-bit unsigned number with a 2-byte value and a range from 0 to +65535. As for Due and SAMD based boards, it stores a 32-bit unsigned number with a 4-byte value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example Word code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>word w = 10000;<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Long<\/span><\/h2>\n\n\n\n<p>Long variables are extended size variables for number storage. Long variables use 4 bytes from memory (32 bits) with a range from -2,147,483,648 to +2,147,483,647.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example Long code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>long speedOfLight = 186000L; \/\/declaration of variable with type Long and initialize it with 186000<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">Unsigned long<\/span><\/h2>\n\n\n\n<p>Similar to the Long data type, unsigned long variables are extended size variables for number storage and use 4 bytes from memory (32 bits). However, unlike standard Longs, unsigned longs do not store negative numbers. They have a range of 0 to +4,294,967,295.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example Unsigned long code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>unsigned long time;\n\nvoid setup() {\n  Serial.begin(9600);\n}\n\nvoid loop() {\n  Serial.print(\"Time: \");\n  time = millis();\n  \/\/prints time since program started\n  Serial.println(time);\n  \/\/ wait a second so as not to send massive amounts of data\n  delay(1000);\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">short<\/span><\/h2>\n\n\n\n<p>A short datatype stores a 16 bit value and uses 2 bytes from memory on ALL Arduinos. They have a range of -32,768 to +32,767.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example short code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>short ledPin = 13<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">float<\/span><\/h2>\n\n\n\n<p>The float is one of the most important Arduino data type as it can store decimal numbers. This data type is for floating-point numbers which are numbers with a decimal point. <\/p>\n\n\n\n<p> Floating-point numbers are often used to approximate the analog and continuous values because they have greater resolution than integers. <\/p>\n\n\n\n<p>This data type has a memory of 32 bit\/ 4 bytes and a range of   -3.4028235E+38 to  +3.4028235E+38.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example float code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>float myfloat;\nfloat sensorCalbrate = 1.117;\n\nint x;\nint y;\nfloat z;\n\nx = 1;\ny = x \/ 2;          \/\/ y now contains 0, ints can't hold fractions\nz = (float)x \/ 2.0; \/\/ z now contains .5 (you have to use 2.0, not 2)<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><span style=\"text-decoration: underline;\">double<\/span><\/h2>\n\n\n\n<p>This data type is a double-precision floating point number.  On ATmega based Arduino boards like the Uno, Mega and Nano, double precision floating-point number occupies 4 bytes (32 bit). That is, the double implementation is exactly the same as the float, with no gain in precision. <\/p>\n\n\n\n<p>While for Due and SAMD based boards (eg. MKR1000, Zero), double have 8 bytes (64-bit) precision.  <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example double code<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>double num = 45.352 ;\/\/ declaration of variable with type double and initialize it with 45.352<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Which data type do you choose to use when programming your Arduino?<\/h2>\n\n\n\n<p>Generally, the data type you choose is not a very big deal during programming. However, when size and speed is concerned, choosing the right data type is crucial. <\/p>\n\n\n\n<p>When picking a data type, try to pick the smallest data type that will fully contain the value you need to store. For example, you want to store a pin number, but your board has less than 128 pins, thus, storing this value in a byte or char type is the best option. <\/p>\n\n\n\n<p>On the other hand, if you have a board with more than 128 pins but less than 255 pins, you can use the byte or unsigned char data type.  <\/p>\n\n\n\n<p>By using smaller data types, it can enhance your speed as they require less memory reads. <\/p>\n\n\n\n<p>All in all when choosing your data type, always use the smallest data type necessary to store the value. <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>That is all for this tutorial. If you have any questions about these Arduino data types, do leave a comment down below!<\/p>\n\n\n\n<p>Want to get started programming your Arduino but do not know which Arduino board to get? No fear as we have a simple table shown below comparing almost all of Arduino models including our very Seeeduino models too.  &nbsp;<\/p>\n\n\n\n<p>We listed specifications including processor, operating voltage, input voltage, clock speed, digital I\/O, PWM, analog inputs, UART, Grove connectors, flash memory, and USB connectors for 7 Arduino official boards and 13 Seeeduino boards. I hope this table will help you quickly compare different Arduino boards and get one that best fits your project needs. <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><th><br>Processor<\/th><th>Operating Voltage<\/th><th>Clock Speed<\/th><th>Digital I\/O<\/th><th>PWM<\/th><th>Analog Inputs<\/th><th>UART<\/th><th>Grove<\/th><th>Flash(KB)<\/th><th>USB<\/th><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Arduino-Uno-Rev3-p-2995.html\">Arduino Uno<\/a><\/td><td>ATmgea328<\/td><td>5V<\/td><td>16 MHZ<\/td><td>14<\/td><td>6<\/td><td>6<\/td><td>1<\/td><td>0<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Arduino-Mega2560-Rev3-p-695.html\">Arduino Mega 2560 R3<\/a><\/td><td>ATmega2560<\/td><td>5V<\/td><td>16 MHZ<\/td><td>54<\/td><td>15<\/td><td>16<\/td><td>4<\/td><td>0<\/td><td>256<\/td><td>Type-B USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Arduino-Nano-v3-p-1928.html\">Arduino Nano<\/a><\/td><td>ATmega328<\/td><td>5V<\/td><td>16 MHZ<\/td><td>14<\/td><td>6<\/td><td>8<\/td><td>1<\/td><td>0<\/td><td>32<\/td><td>Mini USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Arduino-Micro-with-Headers-p-3068.html\">Arduino Micro<\/a><\/td><td>ATmega32u4<\/td><td>5V<\/td><td>16 MHZ<\/td><td>20<\/td><td>7<\/td><td>12<\/td><td>2<\/td><td>0<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Arduino-Y-N-p-1616.html\">Arduino YUN<\/a><\/td><td>ATmega32u4<\/td><td>5V<\/td><td>16 MHZ<\/td><td>20<\/td><td>7<\/td><td>12<\/td><td>2<\/td><td>0<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/ARDUINO-MKR1000-p-45.html\">Arduino MKR1000 wifi<\/a><\/td><td>ATSAMW25 SoC<\/td><td>5V<\/td><td>48 MHZ<\/td><td>8<\/td><td>12<\/td><td>7<\/td><td>1<\/td><td>0<\/td><td>256<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Mega-ATmega2560.html\">Seeeduino Mega<\/a><\/td><td>ATmega2560<\/td><td>5V\/3.3V<\/td><td>16MHz<\/td><td>70<\/td><td>14<\/td><td>16<\/td><td>4<\/td><td>0<\/td><td>256<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Lite.html\">Seeeduino Lite<\/a><\/td><td>ATmega32u4<\/td><td>5V\/3.3V<\/td><td>16MHz<\/td><td>20<\/td><td>7<\/td><td>12<\/td><td>1<\/td><td>2<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-GPRS-p-1909.html\">Seeeduino GPRS<\/a><\/td><td>ATmega32u4<\/td><td>5V\/3.3V<\/td><td>16MHz<\/td><td>20<\/td><td>7<\/td><td>12<\/td><td>1<\/td><td>0<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Cloud-Arduino-Yun-compatible-openWRT-controller-p-2123.html\">Seeeduino Cloud<\/a><\/td><td>ATmega32u4<\/td><td>5V\/3.3V<\/td><td>16MHz<\/td><td>20<\/td><td>7<\/td><td>12<\/td><td>1<\/td><td>2<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4-2-p-2517.html\">Seeeduino V4.2<\/a><\/td><td>ATmega328<\/td><td>5V\/3.3V<\/td><td>16MHz<\/td><td>14<\/td><td>6<\/td><td>6<\/td><td>1<\/td><td>3<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Stalker-V3-1-p-2686.html\">Seeeduino Stalker V3.1<\/a><\/td><td>Atmega328P<\/td><td>5V\/3.3V<\/td><td>8MHz<\/td><td>14<\/td><td>0<\/td><td>6<\/td><td>1<\/td><td>2<\/td><td>32<\/td><td>Mini USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-LoRaWAN-p-2780.html\">Seeeduino LoRaWAN<\/a><\/td><td>ATSAMD21G18<\/td><td>5V\/3.3V<\/td><td>48MHz<\/td><td>20<\/td><td>20<\/td><td>6<\/td><td>2<\/td><td>4<\/td><td>256<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-LoRaWAN-W-GPS-p-2781.html\">Seeeduino LoRaWAN W\/GPS<\/a><\/td><td>ATSAMD21G18<\/td><td>3.3V<\/td><td>48MHz<\/td><td>20<\/td><td>20<\/td><td>6<\/td><td>2<\/td><td>4<\/td><td>256<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Lotus-V1-1-ATMega328-Board-with-Grove-Interface.html\">Seeeduino Lotus V1.1<\/a><\/td><td>Atmega328P<\/td><td>5V<\/td><td>16MHz<\/td><td>14<\/td><td>6<\/td><td>7(0-5, ADC)<\/td><td>1<\/td><td>12<\/td><td>32<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Lotus-Cortex-M0-p-2896.html\">Seeeduino Lotus Cortex-M0+<\/a><\/td><td>SAMD21<\/td><td>3.3V<\/td><td>48MHz<\/td><td>14<\/td><td>10<\/td><td>6<\/td><td>2<\/td><td>12<\/td><td>256<\/td><td>Micro USB<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Cortex-M0-p-4070.html\">Seeeduino Cortex-M0+<\/a><\/td><td>SAMD21<\/td><td>5V<\/td><td>48MHz<\/td><td>14<\/td><td>10<\/td><td>6<\/td><td>1<\/td><td>3<\/td><td>256<\/td><td>Type-C<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Nano-p-4111.html\">Seeeduino Nano<\/a><\/td><td>Atmega328P<\/td><td>5V<\/td><td>16MHz<\/td><td>14<\/td><td>6<\/td><td>8<\/td><td>1<\/td><td>1<\/td><td>32<\/td><td>Type-C<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Crypto-ATmega4809-ECC608-p-4369.html\">Seeeduino Crypto<\/a><\/td><td>ATmega4809<\/td><td>5V<\/td><td>16Mhz<\/td><td>14<\/td><td>5<\/td><td>6<\/td><td>1<\/td><td>3<\/td><td>48<\/td><td>Type-C<\/td><\/tr><tr><td><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html\">Seeeduino XIAO<\/a><\/td><td>SAMD21G18<\/td><td>3.3V<\/td><td>48MHz<\/td><td>11<\/td><td>10<\/td><td>11<\/td><td>1<\/td><td>0<\/td><td>256<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Arduino data types. They play an important role when it comes to programming the Arduino.<\/p>\n","protected":false},"author":2781,"featured_media":33112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[6,1109,2020,2352,138],"class_list":["post-32930","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-arduino","tag-arduino-beginner","tag-arduino-guide","tag-arduino-tutorial","tag-arduino-uno"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Getting started with Arduino Data Types - Latest News from Seeed Studio<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting started with Arduino Data Types - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"Arduino data types. They play an important role when it comes to programming the Arduino.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-28T18:48:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-29T05:27:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png\" \/>\n\t<meta property=\"og:image:width\" content=\"354\" \/>\n\t<meta property=\"og:image:height\" content=\"185\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"yida\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yida\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/\",\"name\":\"Getting started with Arduino Data Types - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png\",\"datePublished\":\"2020-05-28T18:48:25+00:00\",\"dateModified\":\"2020-05-29T05:27:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png\",\"width\":354,\"height\":185,\"caption\":\"Getting started with Arduino Data Types\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting started with Arduino Data Types\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e\",\"name\":\"yida\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g\",\"caption\":\"yida\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Getting started with Arduino Data Types - Latest News from Seeed Studio","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/","og_locale":"en_US","og_type":"article","og_title":"Getting started with Arduino Data Types - Latest News from Seeed Studio","og_description":"Arduino data types. They play an important role when it comes to programming the Arduino.","og_url":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2020-05-28T18:48:25+00:00","article_modified_time":"2020-05-29T05:27:10+00:00","og_image":[{"width":354,"height":185,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png","type":"image\/png"}],"author":"yida","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yida","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/","url":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/","name":"Getting started with Arduino Data Types - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png","datePublished":"2020-05-28T18:48:25+00:00","dateModified":"2020-05-29T05:27:10+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e"},"breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png","width":354,"height":185,"caption":"Getting started with Arduino Data Types"},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/05\/29\/getting-started-with-arduino-data-types\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Getting started with Arduino Data Types"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/6457c21fb5499f36fcf657d48dc4380e","name":"yida","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/91a6af461a3a3af5aa79654f77822c7f?s=96&r=g","caption":"yida"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/"}]}},"modified_by":"yida","views":51952,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102-300x157.png",300,157,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",32,17,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/05\/image-102.png",354,185,false]},"author_info":{"display_name":"yida","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/yida\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/32930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/2781"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=32930"}],"version-history":[{"count":4,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/32930\/revisions"}],"predecessor-version":[{"id":33133,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/32930\/revisions\/33133"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/33112"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=32930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=32930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=32930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}