<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://code-reference.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://code-reference.com/feed.php">
        <title>Programming | Library | Reference - Code-Reference.com arduino:data_types</title>
        <description></description>
        <link>https://code-reference.com/</link>
        <image rdf:resource="https://code-reference.com/ttps://code-reference.com/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-06-19T11:56:39+02:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/array?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/booleanvariables?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/byte?rev=1708041852&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/char?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/double?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/float?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/int?rev=1708041852&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/long?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/short?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/string?rev=1708041852&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/stringobject?rev=1708041852&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/unsignedchar?rev=1708041850&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/unsignedint?rev=1708041850&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/unsignedlong?rev=1708041851&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/void?rev=1708041852&amp;do=diff"/>
                <rdf:li rdf:resource="https://code-reference.com/arduino/data_types/word?rev=1361019271&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://code-reference.com/ttps://code-reference.com/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Programming | Library | Reference - Code-Reference.com</title>
        <link>https://code-reference.com/</link>
        <url>https://code-reference.com/ttps://code-reference.com/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://code-reference.com/arduino/data_types/array?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>Arrays</title>
        <link>https://code-reference.com/arduino/data_types/array?rev=1708041851&amp;do=diff</link>
        <description>An array is a collection of variables that are accessed with an index number. Arrays in the C programming language, on which Arduino is based, can be complicated, but using simple arrays is relatively straightforward.

Creating (Declaring) an Array

All of the methods below are valid ways to create (declare) an array.</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/booleanvariables?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>boolean</title>
        <link>https://code-reference.com/arduino/data_types/booleanvariables?rev=1708041851&amp;do=diff</link>
        <description>A boolean holds one of two values, true or false.  (Each boolean variable occupies one byte of memory.)

Example


int LEDpin = 5;       // LED on pin 5
int switchPin = 13;   // momentary switch on 13, other side connected to ground

boolean running = false;

void setup()
{
  pinMode(LEDpin, OUTPUT);
  pinMode(switchPin, INPUT);
  digitalWrite(switchPin, HIGH);      // turn on pullup resistor
}

void loop()
{
  if (digitalRead(switchPin) == LOW)
  {  // switch is pressed - pullup keeps pin high …</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/byte?rev=1708041852&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:12+02:00</dc:date>
        <title>byte</title>
        <link>https://code-reference.com/arduino/data_types/byte?rev=1708041852&amp;do=diff</link>
        <description>Description

A byte stores an 8-bit unsigned number, from 0 to 255.

Example
  [=byte b = B10010;  // &quot;B&quot; is the binary formatter (B10010 = 18 decimal) =]
See also

* word
*  byte
* Variable Declaration

Source: arduino.cc</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/char?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>char</title>
        <link>https://code-reference.com/arduino/data_types/char?rev=1708041851&amp;do=diff</link>
        <description>Description

A data type that takes up 1 byte of memory that stores a character value.  Character literals are written in single quotes, like this: [= 'A' =] (for multiple characters - strings - use double quotes: “ABC”).  

Characters are stored as numbers however. You can see the specific encoding in the  ASCII chart. This means that it is possible to do arithmetic on characters, in which the ASCII value of the character is used (e.g. [= 'A' + 1 =] has the value 66, since the ASCII value of th…</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/double?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>double</title>
        <link>https://code-reference.com/arduino/data_types/double?rev=1708041851&amp;do=diff</link>
        <description>Desciption

Double precision floating point number. On the Uno and other ATMEGA based boards, this occupies 4 bytes. That is, the double implementation is exactly the same as the float, with no gain in precision. 

On the Arduino Due, doubles have 8-byte (64 bit) precision.</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/float?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>float</title>
        <link>https://code-reference.com/arduino/data_types/float?rev=1708041851&amp;do=diff</link>
        <description>Description

Datatype for floating-point numbers, a number that has a decimal point. Floating-point numbers are often used to approximate analog and continuous values because they have greater resolution than integers. Floating-point numbers can be as large as 3.4028235E+38 and as low as -3.4028235E+38. They are stored as 32 bits (4 bytes) of information.</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/int?rev=1708041852&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:12+02:00</dc:date>
        <title>int</title>
        <link>https://code-reference.com/arduino/data_types/int?rev=1708041852&amp;do=diff</link>
        <description>Description

Integers are your primary data-type for number storage. 

On the Arduino Uno (and other ATMega based boards) an int stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) - 1).</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/long?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>Description</title>
        <link>https://code-reference.com/arduino/data_types/long?rev=1708041851&amp;do=diff</link>
        <description>!long

Description

Long variables are extended size variables for number storage, and store 32 bits (4 bytes), from -2,147,483,648 to 2,147,483,647.

Example

    long speedOfLight = 186000L;   // see Integer Constants for explanation of the 'L'


Syntax
  [=long var = val;=]
*var - the long variable name
*val - the value assigned to the variable</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/short?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>short</title>
        <link>https://code-reference.com/arduino/data_types/short?rev=1708041851&amp;do=diff</link>
        <description>Description

A short is a 16-bit data-type. 

On all Arduinos (ATMega and ARM based) a short stores a 16-bit (2-byte) value. This yields a range of -32,768 to 32,767 (minimum value of -2^15 and a maximum value of (2^15) - 1). 


Example
  [=short ledPin = 13;=]
Syntax
  [=short var = val;=]
*var - your short variable name
*val - the value you assign to that variable</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/string?rev=1708041852&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:12+02:00</dc:date>
        <title>string</title>
        <link>https://code-reference.com/arduino/data_types/string?rev=1708041852&amp;do=diff</link>
        <description>Description

Text strings can be represented in two ways.  you can use the String data type, which is part of the core as of version 0019, or you can make a string out of an array of type char and null-terminate it.  This page described the latter method. For more details on the String object, which gives you more functionality at the cost of more memory, see the String object page.</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/stringobject?rev=1708041852&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:12+02:00</dc:date>
        <title>String</title>
        <link>https://code-reference.com/arduino/data_types/stringobject?rev=1708041852&amp;do=diff</link>
        <description>Description

The String class, part of the core as of version 0019, allows you to use and manipulate strings of text in more complex ways than  character arrays do. You can concatenate Strings, append to them, search for and replace substrings, and more.  It takes more memory than a simple character array, but it is also more useful.</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/unsignedchar?rev=1708041850&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:10+02:00</dc:date>
        <title>unsigned char</title>
        <link>https://code-reference.com/arduino/data_types/unsignedchar?rev=1708041850&amp;do=diff</link>
        <description>Description

An unsigned data type that occupies 1 byte of memory. Same as the byte datatype.

The unsigned char datatype encodes numbers from 0 to 255. 

For consistency of Arduino programming style, the byte data type is to be preferred.

Example
  [=unsigned char myChar = 240;=]
See also

*byte
*int
*Arrays
*Serial.println</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/unsignedint?rev=1708041850&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:10+02:00</dc:date>
        <title>unsigned int</title>
        <link>https://code-reference.com/arduino/data_types/unsignedint?rev=1708041850&amp;do=diff</link>
        <description>Description

On the Uno and other ATMEGA based boards, unsigned ints (unsigned integers) are the same as ints in that they store a 2 byte value. Instead of storing negative numbers however they only store positive values, yielding a useful range of 0 to 65,535 (2^16) - 1).</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/unsignedlong?rev=1708041851&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:11+02:00</dc:date>
        <title>unsigned long</title>
        <link>https://code-reference.com/arduino/data_types/unsignedlong?rev=1708041851&amp;do=diff</link>
        <description>Description

Unsigned long variables are extended size variables for number storage, and store 32 bits (4 bytes). Unlike standard longs unsigned longs won't store negative numbers, making their range from 0 to 4,294,967,295 (2^32 - 1).

Example


unsigned long time;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  Serial.print(&quot;Time: &quot;);
  time = millis();
  //prints time since program started
  Serial.println(time);
  // wait a second so as not to send massive amounts of data
  delay(10…</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/void?rev=1708041852&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-02-16T01:04:12+02:00</dc:date>
        <title>void</title>
        <link>https://code-reference.com/arduino/data_types/void?rev=1708041852&amp;do=diff</link>
        <description>The void keyword is used only in function declarations. It indicates that the function is expected to return no information to the function from which it was called.

Example:


// actions are performed in the functions &quot;setup&quot; and &quot;loop&quot;
// but  no information is reported to the larger program

void setup()
{
  // ...
}

void loop()
{
  // ...
}</description>
    </item>
    <item rdf:about="https://code-reference.com/arduino/data_types/word?rev=1361019271&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2013-02-16T13:54:31+02:00</dc:date>
        <title>word</title>
        <link>https://code-reference.com/arduino/data_types/word?rev=1361019271&amp;do=diff</link>
        <description>Description

A word stores a 16-bit unsigned number, from 0 to 65535.  Same as an unsigned int.

Example
  [=word w = 10000; =]
See also

* byte
*  WordCast

Source: arduino.cc</description>
    </item>
</rdf:RDF>
