專注電子技術(shù)學(xué)習(xí)與研究
當(dāng)前位置:單片機(jī)教程網(wǎng) >> Arduino >> 瀏覽文章

Arduino的數(shù)據(jù)類型

作者:huqin   來源:本站原創(chuàng)   點(diǎn)擊數(shù):  更新時間:2014年05月09日   【字體:

數(shù)據(jù)類型

字節(jié)

范圍

備注

void

 

 

只用作函數(shù)聲明,表示沒有返回值

boolean

 

true,false

每一個布爾變量占一個字節(jié)的內(nèi)存

char

1

-128~127

 

unsigned char

1

0~255

 

byte

1

0~255

 

int

2

-32768~32767

在Arduino Due上是4個字節(jié)

unsigned int

2

0~65535

 

word

2

0~65535

 

long

4

-2147483648~2147483647

 

unsigned long

4

0~2^32-1

 

short

2

-32768~32767

 

float

4

-3.4028235E+38~3.4028235E+38

只有6~7位小數(shù)精度

double

4

 

在Arduino Due上有8個字節(jié),其余的跟float一樣

string

 

 

相當(dāng)于char類型的數(shù)組

String

 

 

object

array

 

 

數(shù)組

關(guān)閉窗口