컨텐츠로 건너뛰기
아두이노에서 사용되는 자료형의 크기 정리
보드의 종류에 따라서 달라질 수 있음…
Arduino Data type
| data type |
bit |
min |
max |
| short |
16bit (2byte) |
-(2^15) = -32768 |
(2^15)-1 = 32767 |
| int |
16bit (2byte) |
-(2^15) = -32768 |
(2^15)-1 = 32767 |
| unsigned int |
16bit (2byte) |
0 |
(2^16)-1 = 65535 |
| long |
32bit (4byte) |
-(2^31) = -2,147,483,648 |
(2^31)-1 = 2,147,483,647 |
| unsigned long |
32bit (4byte) |
0 |
(2^32)-1 = 4,294,967,295 |
| long long |
64bit (8byte) |
|
|
| data type |
bit |
limit |
| float |
32bit (4byte) |
소수점 이하 7자리 |
| double |
32bit (4byte) |
소수점 이하 7자리 |
| data type |
bit |
min |
max |
| boolean |
1bit |
0 |
1 |
| char |
8bit (1byte) |
-(2^7) = -128 |
(2^7) -1 = 127 |
| unsigned char |
8bit (1byte) |
0 |
(2^8)-1 = 255 |