Browse Source

display text correctly

main
Hendrik Langer 4 years ago
parent
commit
94b0d23840
  1. 1
      raspberry/roberto/views/frontend/templates/index.html
  2. 3
      trigorilla/src/main.cpp

1
raspberry/roberto/views/frontend/templates/index.html

@ -160,6 +160,7 @@ socket.on('data', (data) => {
$('form#message').submit(function(event) {
gp_socket.emit('text', {data: $('#message_data').val()});
$('#message_data').val("");
return false;
});
};

3
trigorilla/src/main.cpp

@ -159,8 +159,9 @@ void loop()
Serial.print(values[3]); Serial.print("\n");
}
} else if (command.charAt(0) == 'T') {
String message = command.substring(3);
String message = command.substring(2);
char* text = message.c_str();
lcd.clear();
lcd.setCursor(0,2);
lcd.print(text);
}

Loading…
Cancel
Save