/*
Programa para trabalhar com struct
*/
struct Teste{
int A;
byte B;
float C;
uint8_t D = 0x80;
};
void setup() {
Serial.begin(115200);
Teste teste;
teste.A = 45;
teste.B = 0x22;
teste.C = 45.92;
Serial.print("Valor 1 = ");
Serial.println(teste.A, DEC);
Serial.print("Valor 2 = ");
Serial.print(teste.B < 16 ? "0" : "");
Serial.println(teste.B, HEX);
Serial.print("Valor 3 = ");
Serial.println(teste.C, 2);
Serial.print("Valor 2 = ");
Serial.print(teste.D < 16 ? "0" : "");
Serial.println(teste.D, HEX);
}
void loop() {
}