Serial. Serial.println(analogValue, HEX) // print as an ASCII-encoded hexadecimal Serial.println(analogValue, DEC) // print as an ASCII-encoded decimal Serial.println(analogValue) // print as an ASCII-encoded decimal Wait for a USB serial connection for up to 30 seconds Make sure your Serial Terminal app is closed before powering your device Int analogValue = 0 // variable to hold the analog value reads an analog input on analog in A0, prints the value out. Println() returns the number of bytes written, though reading that number is optional - size_t (long) // EXAMPLE
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |