일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- Spring
- 프로그래머스
- SQL
- edwith
- programmers
- HTML
- 홀리데이익스프레스
- 쿠킹덤
- 크리스마스
- 티스토리챌린지
- 자바스크립트
- Eclipse
- 오블완
- JavaScript
- Java
- 이클립스
- 개발자
- 쿠키런킹덤
- 자바
- 노마드코더
- Unity
- 딥러닝
- 웹개발
- 쿠킹덤공략
- MySQL
- 유니티
- oracle
- 쿠키런킹덤공략
- 쿠키런킹덤크리스마스
- dart
- Today
- Total
Dev study and notes
아두이노 int 타입 범위. JAVA 의 int 차이. 타입 범위 본문
팀원과 아두이노를 이용하여 센서정보 기록을 프로젝트 연동하다가 해당 센서의 기록 주기를 설정 작업중이였다.
30000 이면.. 30초 간격인데.. 그이상 에러가 되고있다.
알아보니 아두이노의 int 타입의 범위와 JAVA의 int 타입이 다르다.
정확히는 아두이노의 안드로이드 버전에 따라서 16bit(2byte) / 32bit(4byte) 에 따른 범위가 다르기 때문이다.
공식문서를 통해 알게 되었다.
간략히 요약하면
java : int type range = -2147483648 to 2147483647 [2^31]
arduino : int type range = -32,768 to 32,767 [2^15]
참조 : 아두이노 공식문서 , 자바 공식문서
www.arduino.cc/reference/ko/language/variables/data-types/int/
int - 아두이노 참조
예제 코드 This code creates an integer called 'countUp', which is initially set as the number 0 (zero). The variable goes up by 1 (one) each loop, being displayed on the serial monitor. int countUp = 0; //creates a variable integer called 'countUp' voi
www.arduino.cc
docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics)
The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available. See Java Language Changes for a summary of updated
docs.oracle.com
'errorSolution' 카테고리의 다른 글
JPA Project Change Event Handler (waiting) 문제 해결.3 (0) | 2021.03.27 |
---|---|
JPA Project Change Event Handler (waiting) 문제 해결.2 (0) | 2021.03.26 |
JPA Project Change Event Handler (waiting) 완벽 해결!!! sts4 업데이트! (0) | 2021.03.24 |
a .project file already exists in directory 오류 / 이클립스/스프링 import 오류 (0) | 2021.03.24 |
SPRING dependency Scope 종류 / 스프링 디펜던시 스코프 (0) | 2021.03.22 |