lehrkraefte:blc:informatik:ffprg2-2021:twatch:start

This is an old revision of the document!


TTGO TWatch 2020 V3

Links:

Weitere nennenswerte Projekte und Resourcen

Am einfachsten importieren Sie folgendes git-Repository: https://github.com/techlabksbg/minimal_twatch.git

Dieses enthält auch weitere Branches mit Beispielen.

  • Neues PIO-Projekt
  • Board: TTGO T-WATCH
  • Framework: Arduino
  • Ändern Sie die Datei platformio.ini wie folgt ab:

platformio.ini

platformio.ini

[env]
platform = espressif32
board = ttgo-t-watch
framework = arduino
monitor_speed = 115200
 
 
[env:ttgo-t-watch-linux]
upload_port = /dev/ttyUSB0
 
[env:ttgo-t-watch-windows]
upload_port = COM4
 
[env:ttgo-t-watch-macos]
; On the Mac, set the environment variable PLATFORMIO_UPLOAD_PORT 
; to your device port, for example as follows:
;
;          launchctl setenv PLATFORMIO_UPLOAD_PORT /dev/tty.usbserial-0233D4FC
  • Und das main.cpp:

main.cpp

main.cpp

#include <Arduino.h>
 
void setup() {
  Serial.begin(115000);
}
 
/**
 * Open the serial monitor to see the output
 */
void loop() {
  Serial.println("Hello world!");
  delay(1000);
}
  • Neuen git-branch anlegen (z.B. motorapp).
  • Im Ordner src/app einen neuen Ordner anlegen (z.B. motorapp), dort drin zwei neue Dateien, motorapp.h und motorapp.cpp
  • Icon erstellen: 72×72 Pixel, mit Alpha-Channel, konvertieren auf https://lvgl.io/tools/imageconverter
  • App Programmieren (sorry)
  • App in launcher.h eintragen.
  • Testen
  • Committen
  • lehrkraefte/blc/informatik/ffprg2-2021/twatch/start.1628231656.txt.gz
  • Last modified: 2021/08/06 08:34
  • by Ivo Blöchliger