Created
January 1, 2014 15:30
-
-
Save vasmani/8208850 to your computer and use it in GitHub Desktop.
Arduino 16진수로 변환
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| char temp[3]; | |
| unsigned int kmh; | |
| void setup() { | |
| // put your setup code here, to run once: | |
| Serial.begin(38400); | |
| temp[0] = 'C'; | |
| temp[1] = 'A'; | |
| } | |
| void loop() { | |
| // put your main code here, to run repeatedly: | |
| kmh = (int)strtol(temp, NULL, 16); | |
| Serial.println(kmh); | |
| delay(1000); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment