Advertisement
RuiViana

Print_Write

Mar 19th, 2018
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. void setup()
  2. {
  3.   Serial.begin(9600);
  4. }
  5.  
  6. void loop()
  7. {
  8.   Serial.println("String");     // Imprime String
  9.   Serial.println(0x31);         // Imprime valor decimal 49 para 31 hexadecimal
  10.   Serial.println(6);            // Imprime 6
  11.   Serial.println(44, HEX);      // Imprime valor hexadecimal 2C  para o decimal 44
  12.   Serial.println(75, BIN);      // Imprime Bina'rio 100 1011 = HEX 4B  hexadecimal para o decimal 75
  13.   Serial.println(0x0A, DEC);    // Imprime 10 = Decimal para o Hexadecimal 0x0A
  14.  
  15.   Serial.write("String");       // Imprime  String
  16.   Serial.println(" ");
  17.   Serial.write(0x31);           // Imprime Character 1 valor para o Hexadecimal 0x31
  18.   Serial.println(" ");
  19.   Serial.write(56);             // Imprime Character 8 valor para o Decimal 56  (Hexa 38)
  20.   Serial.println(" ");
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement