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

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
lehrkraefte:blc:informatik:ffprg2-2021:twatch:start [2021/06/29 15:39]
Ivo Blöchliger
lehrkraefte:blc:informatik:ffprg2-2021:twatch:start [2021/08/17 14:04]
Ivo Blöchliger
Line 1: Line 1:
-====== TTGO TWatch 2020 ======+====== TTGO TWatch 2020 V3 ====== 
 +===== Setup VSCode ===== 
 +  * [[e24laptops|Setup auf den Linux-Laptops aus dem E24]] 
 +  * [[eigenegeraete|Setup auf eigenen Geräten]] 
 +  * [[schulcomputer|Setup auf den Schulcomptern]] 
 + 
 +===== Links und Resourcen ===== 
 Links: Links:
-  * https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library+  * Library, die wir verwenden: https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library (naja, eigentlich ein Klon davon, mit aktuellerer lvgl-Library). 
 + 
 +Weitere nennenswerte Projekte und Resourcen
   * https://github.com/SpectralCascade/FancyWatchOS   * https://github.com/SpectralCascade/FancyWatchOS
   * https://github.com/sharandac/My-TTGO-Watch   * https://github.com/sharandac/My-TTGO-Watch
Line 7: Line 16:
   * https://www.freertos.org/index.html   * https://www.freertos.org/index.html
  
 +Weitere TWatch kaufen, z.B. direkt beim Hersteller LilyGo auf [[https://www.aliexpress.com/item/1005002053650442.html|AliExpress]].
  
-===== Setup VSCode ===== +===== Minimales T-Watch Projekt ===== 
-  * File -> Preferences -> Extensions  (oder Ctrl-Shift-X) + 
-  * Suchen nach "PlatformIO IDE", installieren. +Am einfachsten importieren Sie folgendes git-Repository: https://github.com/techlabksbg/minimal_twatch.git 
-    Auf den Laptops vom E24 legen Sie einen Ordner auf /data an, sonst läuft die Home-Partition voll+ 
-    * Öffnen Sie ein Terminal und geben Sie folgende beide Kommandos ein+Dieses enthält auch weitere Branches mit Beispielen. 
-      * sudo mkdir /data/TWatch + 
-      * sudo chown tech/lab /data/TWatch +==== Manuelles Setup ==== 
-    * Installieren Sie git, mit folgendem Kommando + 
-      * sudo apt install git +  * Neues PIO-Projekt 
-     +  * Board: TTGO T-WATCH 
-  * Klick auf den PlatformIO-Icon, dann unter "Miscellaneous""Clone Git Project" auswählen. +  * Framework: Arduino 
-  * Als Adresse https://github.com/techlabksbg/t-watch.git eingeben+  Ändern Sie die Datei platformio.ini wie folgt ab: 
-  * Repository in in /data/TWatch clonen und öffnen. +<hidden platformio.ini> 
-  * Die Extension, die Probleme bereitet desinstallieren+<code txt> 
-  * Der Code sollte nun kompilieren.+[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 Macset the environment variable PLATFORMIO_UPLOAD_PORT  
 +; to your device port, for example as follows: 
 +
 +;          launchctl setenv PLATFORMIO_UPLOAD_PORT /dev/tty.usbserial-0233D4FC 
 +</code> 
 +</hidden> 
 +  * Und das main.cpp: 
 +<hidden main.cpp> 
 +<code c++> 
 +#include <Arduino.h> 
 + 
 +void setup() { 
 +  Serial.begin(115000); 
 +
 + 
 +/** 
 + * Open the serial monitor to see the output 
 + */ 
 +void loop() { 
 +  Serial.println("Hello world!"); 
 +  delay(1000); 
 +
 +</code> 
 +</hidden>
  
 ===== Neue App ===== ===== Neue App =====
   * Neuen git-branch anlegen (z.B. motorapp).   * 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   * Im Ordner src/app einen neuen Ordner anlegen (z.B. motorapp), dort drin zwei neue Dateien, motorapp.h und motorapp.cpp
-  * +  * Icon erstellen: 72x72 Pixel, mit Alpha-Channel, konvertieren auf https://lvgl.io/tools/imageconverter  
 +  * Text-Datei abouticon.txt erstellen, mit Informationen zu den Urhebern der Icons 
 +  * App Programmieren. Dazu den Code einer einfachen App kopieren und Anpassen (z.B. die motorApp oder die poweroff app). 
 +  * App in launcher.h eintragen. 
 +  * Testen 
 +  * Committen 
 +  * Wiederholen. Pullrequest an mich (mündlich oder auf GitHub).
  
  • lehrkraefte/blc/informatik/ffprg2-2021/twatch/start.txt
  • Last modified: 2021/08/21 21:20
  • by Ivo Blöchliger