User Tools

Site Tools


project:scd_scriptingcommanddispatcher:scd-scriptingcommanddispatcher

Differences

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

Link to this comparison view

project:scd_scriptingcommanddispatcher:scd-scriptingcommanddispatcher [2022/01/23 19:05] – [220122 : Einschub: EspSDCard CFS <-> MFS] omdevelopproject:scd_scriptingcommanddispatcher:scd-scriptingcommanddispatcher [2022/09/13 11:58] (current) – external edit 127.0.0.1
Line 47: Line 47:
  
  
 +===== Übersicht =====
  
 +===== zukünftige Aufgaben =====
 +[[:project:SCD_ScriptingCommandDispatcher:scd-scriptingcommanddispatcher-futuredo | SCD-ScriptingCommandDispatcher: FutureDo]]
  
 +==== ScriptingCommandDispatcher: Basis-Version  ====
 +[[:project:SCD_ScriptingCommandDispatcher:scd-scriptingcommanddispatcher-tiny | SCD-ScriptingCommandDispatcher: Tiny]]
  
-===== EntwicklungsschritteFutureDo =====+==== SCD-ScriptingCommandDispatcherFinale Version ==== 
 +[[:project:SCD_ScriptingCommandDispatcher:scd-scriptingcommanddispatcher-pro | SCD-ScriptingCommandDispatcher: Pro]]
  
-==== 2201xx : IT01-Bricks ==== 
-  * Aufbau eines Modells des IT01 mit Bricks 
-  * Hardware des IT01: 
-    * PressureSensor 
-    * DosingValve(DCMotor, Sensor(?)) 
-    * Acht OnOffValves 
-    * Display(4x20) 
-    * Keyboard(4x4) 
-    * Drucker(Uart, Emulation über RPi-Hdmi-Display?) 
-  * Software IT01Manager: 
-    * Tiny: VSCode,MicroPython für Esp32(Interfaces UartPC/BtAD/WlanUdp/UartUC) 
-    * Pro: VSCode,C++ für Esp32(Interfaces UartPC/BtAD/WlanUdp/LanUdp/UartUC) 
-    * VSCode,C++ für Stm32F103(UartUC) 
-    * Windows Python-GUI mit UCUart über USB-Uart-Converter(UartUC) 
  
-==== 2201xx : ChildProcessor ==== 
-  * VSCode mit C++ 
-  * CommandDispatcher (vormals: @LSO, @LSF) für \$LSO, \$LSF, also mit Header \$ ! 
-  * daher Dispatcher.ExecuteCommand: Detektion auf @ (Command-Esp32) / \$ (Command-ChildProcessor) 
-  * VSCode mit Stm32F103C8T6-Module programmieren 
  
-==== 2201xx : BIN-Files ==== 
-  * C++-Files compiled into MicroPython.bin 
-  * {{https://docs.micropython.org/en/latest/develop/cmodules.html|MicroPython external C modules}} 
- 
- 
-==== 2201xx : Vermutlich Ziellösung ==== 
-  * Esp32(C++, VSCode) mit UartPC, UartUC(Chain), BtUart und WlanUdp 
-  * entweder: RPiPico(MicroPython, VSCode) mit UartUC(Chain) 
-  * oder: Esp32(MiniModule, VSCode)(MicroPython, VSCode) mit UartUC(Chain), SDCard(?) 
-  * Stm32xxx(C++, VSCode) mit UartUC(Chain) 
- 
-{{:project:SCD_ScriptingCommandDispatcher:2201190828_ScriptingCommandDispatcher_TargetSolution.png?400 | 2201190828_ScriptingCommandDispatcher_TargetSolution.png}} \\  
- 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\ \\ 
- \\ \\  
- 
-==== 220119 : Kompromiss-Erweiterung ==== 
-  * **OOO** Hardware: weiterer Stm32F103-Controller 
-  * Verkettung Stm32F103-TxD-/RxD-Pins mit Esp32-TxD-/RxD-Pins 
- 
-===== Unbedingt noch erledigen ===== 
-  * **OOO** DokuWiki:pages:module:micropython:Esp32SDCard erzeugen!!! 
-  * **OOO** Esp32ExecuteFile: die letzten beiden Esp32/Pc-Einträge müssen noch auf Esp32ExecuteFile transformiert werden! 
- 
- 
-===== Entwicklungsschritte: InDo ===== 
-==== 220123 : Esp32 - KEINE SDCard in MicroPython ==== 
-  * später (ProVersion): Esp32-SDCard in C++  
-  * später (ProVersion): Esp32-Lan in C++ 
-  * weitermachen mit TinyVersion: Esp32-MicroPyton: kein Lan, keine SDCard 
- 
-==== 220122 : Einschub: EspSDCard CFS <-> MFS  ==== 
-  * Sequentieller Zugriff auf beide FileSystems: 
-    * MFS : MemeoryFileSystem(default) 
-    * CFS : CardFileSystem 
-  * Basis: {{:module:micropython:Esp32SDCard:2201161640_Esp32SDCard_02V02_wr8000lines.zip | 2201161640_Esp32SDCard_02V02_wr8000lines.zip}} 
-  * --- gilt nur für ESP32(MicroPython, SriptingCommandDispatcher) --- 
-  * Ergebnis: SDCard unter MicroPython nur sehr eingeschränkt nutzbar! 
-  * Nur einmal Wechsel von MFS -> CFS möglich! 
-  * Kein Wechsel von CFS -> MFS möglich! 
-  * notwendiger SoftSystemReset am Program-Ende! 
-  * default: MFS mounted 
-  * kein umount von MFS möglich 
-  * alle Missergebnisse unter **Esp32SDCard** 
-  * damit: ESP32(MicroPython, SriptingCommandDispatcher) 
-    * KEIN LAN möglich 
-    * KEIN Wechsel MFS<->CFS 
-  * -> Esp32 nur als Tiny(Ohne SDCard, Lan) in MicroPython einsetzbar... 
- 
-==== 220122 : Kompromiss-Erweiterung: Einbau EspExecuteFile in Esp32SCD ==== 
-  * Fehler im FileSystem???  
-    * exec(open('blinky.py').read()) wird ausgeführt 
-    * 'demoy.py' aber nicht, da nicht auf FS, obwohl mehrfach Upload versucht???!!! 
-    * weiter mit blinky, wird jetzt ausgeführt: 
-    * secure Esp32: {{:module:micropython:Esp32ExecuteFile:2201221613_Esp32ScriptingCommandDispatcher.zip | 2201221613_Esp32ScriptingCommandDispatcher.zip}} 
-    * secure PC: {{:module:micropython:Esp32ExecuteFile:2201221613_PcScriptingCommandDispatcher.zip | 2201221613_PcScriptingCommandDispatcher.zip}} 
-    * ganz sicher: exec(exec(open(<fileonsdcard>[.py]).read()) wird nur mit Files auf SDCard ausgeführt, 
-    * wenn SDCard noch geöffnet ist !!!! 
-    * so, ENDLICH Fehler gefunden: 
-      * Wird eine SDCard aktiv an Esp32 angeschlossen UND bleibt(!) eine Protocol-Datei geöffnet, greift 
-      * > exec(open('blinky.py').read(), globals(), locals()) 
-      * NICHT auf das LFS-LocalFileSystem zu, sondern auf die Files der SDCard! 
-      * -> IMMER nach SD-Access File.open() auch wieder schliessen : File.close() !!! 
-  * {{:module:micropython:Esp32ExecuteFile:2201221809_Esp32ScriptingCommandDispatcher_01V09.zip | 2201221809_Esp32ScriptingCommandDispatcher_01V09.zip}} 
-  * {{:module:micropython:Esp32ExecuteFile:2201221809_PcScriptingCommandDispatcher_01V09.zip | 2201221809_PcScriptingCommandDispatcher_01V09.zip}} 
-  * **OOO** die letzten beiden Esp32/Pc-Einträge müssen noch auf Esp32ExecuteFile transformiert werden! 
- 
-==== 220122 : Kompromiss-Erweiterung: Esp32ExecuteFile (Locals) ==== 
-  * (deutliche) Übergabe von globalen und lokalen Übergabeparametern: Integer-Variable 
-  * (deutliche) Übergabe von globalen und lokalen Übergabeparametern: Class-Instanzen 
-  * {{:module:micropython:Esp32ExecuteFile:2201221134_Esp32ExecuteFile_01V03.zip | 2201221134_Esp32ExecuteFile_01V03.zip}} 
- 
-=== Ausgabe 2201221134_Esp32ExecuteFile_01V03 : Locals & Globals === 
-<code text> 
->>> 
-*** Esp32ExecuteFile: begin 
-######################################## 
---- Locals ------------------------------- 
-{'Handler': <CHandler object at 3ffe5880>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13004, 'GCalculator': <CCalculator object at 3ffe5140>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 2, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>} 
---- Globals ------------------------------ 
-{'Handler': <CHandler object at 3ffe5880>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13004, 'GCalculator': <CCalculator object at 3ffe5140>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 2, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>} 
------------------------------------------- 
---- Begin -------------------------------- 
-GInteger[13000] 
-GCalculator[321] 
---- Main -------------------------------- 
-GInteger[13000] 
-GCalculator[321] 
-Execute:begin 
---- blinky:begin 
---- blinky: LLL[13000] 
---- blinky: Calculator[321] 
---- blinky: [13001] 
---- blinky: Calculator[10321] 
---- blinky:end 
-Execute:end 
-GInteger[13001] 
-GCalculator[10321] 
---- End -------------------------------- 
-GInteger[13001] 
-GCalculator[10321] 
-######################################## 
---- Locals ------------------------------- 
-{'Handler': <CHandler object at 3ffeb7e0>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13001, 'GCalculator': <CCalculator object at 3ffea3e0>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 0, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>} 
---- Globals ------------------------------ 
-{'Handler': <CHandler object at 3ffeb7e0>, 'HAN': <module 'Handler' from 'Handler.py'>, 'gc': <module 'gc'>, 'GInteger': 13001, 'GCalculator': <CCalculator object at 3ffea3e0>, 'CAL': <module 'Calculator' from 'Calculator.py'>, 'bdev': <Partition type=1, subtype=129, address=2097152, size=2097152, label=vfs, encrypted=0>, 'TIM': <module 'utime'>, 'I': 0, '__name__': '__main__', 'Execute': <function Execute at 0x3ffea3d0>, 'time': <module 'utime'>, 'uos': <module 'uos'>} 
------------------------------------------- 
-Handler[4321] 
---- Handler -------------------------------- 
-Handler[4321] 
-Handler-Execute:begin 
---- blinky:begin 
---- blinky: LLL[13001] 
---- blinky: Calculator[10321] 
---- blinky: [13002] 
---- blinky: Calculator[20321] 
---- blinky:end 
-Handler-Execute:end 
-Handler[8642] 
---- Handler -------------------------------- 
-Handler[8642] 
-Handler-Execute:begin 
---- blinky:begin 
---- blinky: LLL[13002] 
---- blinky: Calculator[20321] 
---- blinky: [13003] 
---- blinky: Calculator[30321] 
---- blinky:end 
-Handler-Execute:end 
-Handler[17284] 
---- Handler -------------------------------- 
-Handler[17284] 
-Handler-Execute:begin 
---- blinky:begin 
---- blinky: LLL[13003] 
---- blinky: Calculator[30321] 
---- blinky: [13004] 
---- blinky: Calculator[40321] 
---- blinky:end 
-Handler-Execute:end 
-Handler[34568] 
---- End -------------------------------- 
-GInteger[13004] 
-GCalculator[40321] 
-Handler[34568] 
-######################################## 
-*** Esp32ExecuteFile: end 
-♦♦> 
-</code> 
- 
- 
-==== 220122 : Kompromiss-Erweiterung: ExecuteFile (Globals) ==== 
-  * Basis MicroPython: {{:module:micropython:Esp32ExecuteFile:2201211901_Esp32ExecuteFile_01V02.zip | 2201211901_Esp32ExecuteFile_01V02.zip}} 
-  * (deutliche) Übergabe von globalen Übergabeparametern: Integer-Variable 
-  * (deutliche) Übergabe von globalen Übergabeparametern: Class-Instanzen 
-  * {{:module:micropython:Esp32ExecuteFile:2201221038_Esp32ExecuteFileGlobalsIC.zip | 2201221038_Esp32ExecuteFileGlobalsIC.zip}} 
-  * {{:module:micropython:Esp32ExecuteFile:2201221038_Esp32ExecuteFileGlobalsIC.png?400 | 2201221038_Esp32ExecuteFileGlobalsIC.png}} 
- 
- \\ \\ \\ \\ \\ \\ \\ \\ \\  
- \\ \\ \\ \\ \\ \\ \\ \\  
- 
- 
-==== 220121 : Kompromiss-Erweiterung: ExecuteFile ==== 
-  * (von unten:) Ausbau des Dispatchers mit neuen Commands: 
-    * **???!!!** Problem: Übergabe von globalen SystemVariablen an Scripts !!!??? 
-    * Übergabe globals() und locals() gelöst Python auf dem PC 
-    * DokuWiki: **!!! OOO !!!** noch pages:module:python:ExecFile:ExecFile.txt erzeugen !!! 
-    * Parameter-Übergabe in Python: {{:module:python:ExecFile:2201192121_ExecFile_01V01.zip | 2201192121_ExecFile_01V01.zip}} 
-    * Parameter-Übergabe in MicroPython (als Basis für XPS...-Commands):  
-    * {{:module:micropython:Esp32ExecuteFile:2201211858_Esp32ExecuteFile_01V01.zip | 2201211858_Esp32ExecuteFile_01V01.zip}} 
-    * ÜbergabeParameter Local: {{:module:micropython:Esp32ExecuteFile:2201211901_Esp32ExecuteFile_01V02.zip | 2201211901_Esp32ExecuteFile_01V02.zip}} 
- 
-=== Ausgabe von 2201211901_Esp32ExecuteFile_01V02 === 
-{{:module:micropython:Esp32ExecuteFile:2201211901_Esp32ExecuteFile_01V02.png?400 | 2201211901_Esp32ExecuteFile_01V02.png}} 
- 
- 
-=== MicroPython-Main-Program: Esp32ExecuteFile.py === 
-<code python> 
-# 
-class CCalculator(): 
-    def __init__(self): 
-        self.Result = 123 
-        return 
-    def Add(self, a, b): 
-        self.Result = a + b 
-        return self.Result 
-# 
-def Execute(): 
-    print('Execute:begin') 
-    L = 4321 
-    exec(open('blinky.py').read(), globals(), locals()) 
-    print('Execute:end') 
-    return     
-# 
-print('*** Esp32ExecuteFile: begin') 
-print('---------------------------------------------------------------------') 
-print(locals()) 
-print('---------------------------------------------------------------------') 
-print(globals()) 
-print('---------------------------------------------------------------------') 
-C = CCalculator() 
-print(C.Result) 
-C.Add(3, 4) 
-print(C.Result) 
-L = 4321 
-Execute() 
-print(C.Result) 
-# 
-print('*** Esp32ExecuteFile: end') 
-</code> 
- 
-=== MicroPython-Execute-Program: blinky.py === 
-<code python> 
-import time as TIM 
-# 
-print('blinky:begin') 
-# NC !!! global C 
-print('Local L[{}]'.format(L)) 
-# 
-for I in range(10, 13): 
-    # 
-    C.Add(1, I) 
-    print('.' + str(C.Result) + '.') 
-    TIM.sleep(0.5) 
-print('blinky:end') 
-</code> 
- 
-=== Program-Output: Esp32ExecuteFile.py -> blinky.py === 
-{{:module:micropython:Esp32ExecuteFile:2201211909_Esp32ExecuteFileOutput.png?400 | 2201211909_Esp32ExecuteFileOutput.png}} 
- \\ \\ \\ \\ \\ \\ \\ \\ \\  
- \\ \\ \\ \\ \\ \\ \\ \\ \\  
- 
-    * UPS - Upload Python-Script <filename.py> 
-    * DPS - Download Python-Script <filename.py> 
-    * mit Scripting - daher auch SCD-ScriptingCommandDispatcher 
-    * MultiTasking Verarbeitung von uP-Scripts (execute filename.py): 
-    * XPS - Execute Python-Script <filename.py> 
-    * APS - Abort (all) Python-Script(s) <none> 
- 
- 
-==== 220120 : Kompromiss-Erweiterung RPi ==== 
-  * **OOO** RPiZW mit Netzteil von WBoogaerts ausprobieren!!! 
-  * Wunsch: RPiZW mit Python und Uart(-UartUC!) 
-  * ------------------------------------ 
-  * ZielA: RPiZW für PSR-PythonScriptRemoting über UartUC 
-  * ZielB: RPi3/4 GuiTerminal mit PSR über UartUC 
-  * ZielC: RPiP(ico) mit PSR über UartUC 
-  * ------------------------------------ 
-  * hat überhaupt nicht funktioniert, da Netzteile für RPiZW nicht genügend Spannung gebracht haben! 
-  * Austausch von RPiZW mit RPi3B 
-  * Anschluss von 20pin-RPi-Steckerleiste: Uart(RxPin:GPIO15|TxPin:GPIO14) 
-  * Python-Library: {{http://wiringpi.com/reference/serial-library/ | wiringPi }}  
-  * Installation: NC! **sudo apt-get install wiringpi** 
-  * Top-Erklärung {{https://www.electronicwings.com/raspberry-pi/raspberry-pi-uart-communication-using-python-and-c | Uart-RPi}} 
-  * GESCHAFFT: Uart0 auf RaspberryPi-Stecker(rechts RPi-Remote-Desktop)  
-  * kommuniziert mit 115200baud -> FTDI-Uart-USB -> mit PC-USB und Terminal(links) 
-{{:project:SCD_ScriptingCommandDispatcher:2201202001_RPi3UartRemote.jpg?500 | 2201202001_RPi3UartRemote.jpg }} 
-{{:project:SCD_ScriptingCommandDispatcher:2201202002_RPi3UartHardware.jpg?500 | 2201202002_RPi3UartHardware.jpg }} 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\ \\ 
- \\ \\ \\ \\  
- 
- 
-==== 220119 : Kompromiss-Erweiterung ==== 
-  * um AdressCharacter (0..9, A..Z) erweiterte Syntax: <@><address>< ><command>[< ><parameteri>]<CR><LF> 
-  * bisher Commands: 
-    * X LSO - LedSystemOn 
-    * X LSF - LedSystemOff 
-  * X Ausbau des Dispatchers mit neuen Keyboard-Commands: 
-    * X EKB - EnableKeyboard 
-    * X DKB - DisableKeyboard 
-    * X APR - AbortProgramReset (Dispatcher.AbortProgramReset()) 
-    * {{:project:SCD_ScriptingCommandDispatcher:2201191620_Esp32ScriptingCommandDispatcher_01V07_commanddisplay.zip | 2201191620_Esp32ScriptingCommandDispatcher_01V07_commanddisplay.zip}} 
-  * X Ausbau des Dispatchers mit neuen LCDisplay-Commands: 
-    * X CLD - Clear Display 
-    * X WDT <r> <c> <t> - WriteDisplayText Row Column Text 
-    * X SDO - SetDisplayOn 
-    * X SDF - SetDisplayOff 
-    * X SBO - SetBacklightOn 
-    * X SBF - SetBacklightOff 
-    * {{:project:SCD_ScriptingCommandDispatcher:2201191707_Esp32ScriptingCommandDispatcher_01V08_commanddisplay.zip | 2201191707_Esp32ScriptingCommandDispatcher_01V08_commanddisplay.zip}} 
- 
-  * Ausbau des Dispatchers mit neuen Commands: 
-    * **???!!!** Problem: Übergabe von globalen SystemVariablen an Scripts !!!??? 
-    * UPS - Upload Python-Script <filename.py> 
-    * DPS - Download Python-Script <filename.py> 
-    * mit Scripting - daher auch SCD-ScriptingCommandDispatcher 
-    * MultiTasking Verarbeitung von uP-Scripts (execute filename.py): 
-    * XPS - Execute Python-Script <filename.py> 
-    * APS - Abort (all) Python-Script(s) <none> 
-   
- 
-==== 220119 : Kompromiss ==== 
-  * / (nicht) alle Hardware Threads umwandeln in Execute-Methoden 
-  * X Nur noch 3 Threads: 
-    * X ThreadMain : existiert per Definition, Main-Loop 
-    * / ThreadInterface :  
-      * ALLE sleep()s eleminieren! 
-      * / KEIN UartPC.Execute, Uart-Thread bleibt erhalten! 
-      * / KEIN UartUC.Execute, Uart-Thread bleibt erhalten! 
-      * X BtUartAD.Execute 
-      * X WlanUdpPC.Execute 
-    * X ThreadController :  
-      * ALLE sleep()s eleminieren! 
-      * X Keyboard4x4.Execute 
-      * X LCDisplayI2C.Execute 
-      * X SDCard.Execute 
-  * Ausgangsversion: 
-  * {{:project:SCD_ScriptingCommandDispatcher:2201161933_Esp32ScriptingCommandDispatcher_NearlyOKwithSDCard.zip | 2201161933_Esp32ScriptingCommandDispatcher_NearlyOKwithSDCard.zip}} 
-  * Reduktion auf drei Threads: 
-  * {{:project:SCD_ScriptingCommandDispatcher:2201191027_Esp32ScriptingCommandDispatcher_01V05_minimalthread.zip | 2201191027_Esp32ScriptingCommandDispatcher_01V05_minimalthread.zip}} 
-  * mit DEBUG- und ACTIVITY-Constants: 
-  * {{:project:SCD_ScriptingCommandDispatcher:2201191147_Esp32ScriptingCommandDispatcher_01V06_ifdef.zip | 2201191147_Esp32ScriptingCommandDispatcher_01V06_ifdef.zip}} 
-   
-==== 220118 : Esp32ThreadCountMaximum ==== 
-  * MinimalProgram zum Test der Maxizahl von parallelen Threads 
-  * MinimalProgram : die Anzahl der parallelen Threads in MicroPython auf 16 begrenzt! 
-  * "cannot create thread" : vermutlich RAM-Mangel, da jeder Thread 4kB für Stack benötigt 👎👎👎 
-  * falsch: gc.collect / gc.free_ram Ausgabe zeigt, dass genügend RAM während der parallelen 16-fach Thread-Verarbeitung (100kB !!!) vorhanden ist! 
-  * ABER: am RAM kann es nicht liegen: in den aufeinander folgenden Thread-States(start/busy/abort/end) sind immerhin noch 100kB(!!!) RAM FREI???? 
-  * Ungelöstes Problem: ??? Welcher Mechanismus verhindert den Start von mehr als 16 Threads bei Minimal-Programm ??? 
- 
-{{:module:micropython:Esp32ThreadCountMaximum:2201181249_Esp32ThreadCountMaximumRamCollect.jpg?200 |2201181249_Esp32ThreadCountMaximumRamCollect.jpg}}  
- 
-{{:module:micropython:Esp32ThreadCountMaximum:2201181153_Esp32ThreadCountMaximumError.jpg?400 | 2201181153_Esp32ThreadCountMaximumError.jpg}} \\  
- 
-{{:module:micropython:Esp32ThreadCountMaximum:2201181153_Esp32ThreadCountMaximumMainLoop.jpg?400 | 2201181153_Esp32ThreadCountMaximumMainLoop.jpg}} \\ 
- 
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\   
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ 
-\\  
- 
-==== 220118 : MPY-Files ==== 
-  * precompiled Python-Files 
-  * {{https://docs.micropython.org/en/latest/reference/mpyfiles.html?highlight=mpy|MPY-Files}} 
-  * am 220118 versucht: 
-    * Modul: /Downloads/python/_Esp32MpyFile 
-    * !!! noch Module-DokuWiki erzeugen !!! 
-    * precompile: **python -m mpy-cross Esp32MpyFile.py** 
-    * erzeugt: **Esp32MpyFile.mpy** 
-    * aber: ~dieser *.mpy-File nur auf PC lauffähig, nicht auf MicroController! 
- 
- 
- 
- 
- 
- 
-==== 220113 : System-Time ==== 
-  * Events werden immer in Row3 (unterste Zeile) des Displays ausgegeben 
-  * LedSystem mit OnEvent ausstatten 
-  * Erzeugung eines Sekunden-Events mit **!EST <hh>:<mm>:<ss>** 
-  * Vollversion: {{project:SCD_ScriptingCommandDispatcher:2201131550_Esp32ScriptingCommandDispatcher_01V02.zip | 2201131550_Esp32ScriptingCommandDispatcher_01V02.zip}} 
-  * Vollversion: {{project:SCD_ScriptingCommandDispatcher:2201131550_PcScriptingCommandDispatcher_01V02.zip | 2201131550_PcScriptingCommandDispatcher_01V02.zip}} 
-==== 220113 : Autostart ==== 
-  * Keine Änderung **boot.py** 
-  * Erzeugung/Speicherung von **main.py** mit **execfile('Esp32ScriptingCommandDispatcher.py')** 
- 
- 
-==== 220113 : Reaktivierung Commands ==== 
-  * Dispatcher.Commands (entsprechend Dispatcher.Events) 
-  * volle kreuz/quer-Kommunikation über UsbUart(PC-UC), BluetoothUart(Tablet-UC), WlanUdp(PC-UC) 
-  * Generierung KeyCode-Events mit Tastatur4x4  
-  * Ansteuerung LCDisplayI2C 
-  * {{project:SCD_ScriptingCommandDispatcher:2201131106_Esp32ScriptingCommandDispatcher_01V01.zip | 2201131106_Esp32ScriptingCommandDispatcher_01V01.zip}} 
-  * {{project:SCD_ScriptingCommandDispatcher:2201131106_PcScriptingCommandDispatcher_01V01.zip | 2201131106_PcScriptingCommandDispatcher_01V01.zip}} 
- 
-==== 220113 : Zeit-Prozess-Optimierung ==== 
-  * Versuch: CB Keyboard4x4_OnKeyEvent pushed nur noch Event -> EventLines(Dispatcher) 
-  * Main: Dispatcher.Execute -> BtUartAD- / WlanUdpPC- / UartUC- / UartPC.TxLine(event) 
-  * {{project:SCD_ScriptingCommandDispatcher:2201130933_Esp32ScriptingCommandDispatcher_00V08.zip | 2201130933_Esp32ScriptingCommandDispatcher_00V08.zip}} 
-==== 220112 : Hardware/Software-Erweiterung ==== 
-  * Zusatz-Hardware: LCDisplayI2C 
-  * Version mit LCDisplay: {{project:SCD_ScriptingCommandDispatcher:2201121411_Esp32ScriptingCommandDispatcher_00V04_lcdisplay.zip | 2201121411_Esp32ScriptingCommandDispatcher_00V04_lcdisplay.zip}} 
-  * jetzt auch mit UartUC (bisher CreateThread-Exceeption) : 
-  * {{project:SCD_ScriptingCommandDispatcher:2201121525_Esp32ScriptingCommandDispatcher_00V05_uartuc.zip | 2201121525_Esp32ScriptingCommandDispatcher_00V05_uartuc.zip}} 
-  * ab und zu: Problem bei Bt-Connection mit AndroidDevice (Connection failed gatt status 133) 
-  * Lösung: noch einmal verbinden!!!! 
-  * {{project:SCD_ScriptingCommandDispatcher:2201121606_Esp32ScriptingCommandDispatcher_00V06.zip | 2201121606_Esp32ScriptingCommandDispatcher_00V06.zip}} 
- 
-  * Zusatz-Hardware: Keyboard4x4 
-  * Keyboard-Tastendruck sendet Event zu allen (Uart/Bt/Wlan-)Interfaces 
-  * {{project:SCD_ScriptingCommandDispatcher:2201122328_Esp32ScriptingCommandDispatcher_00V07.zip | 2201122328_Esp32ScriptingCommandDispatcher_00V07.zip}} 
- 
- 
- 
- 
-==== 220112 : geplante(!) Software-Erweiterung ==== 
-  * mit Scripting - daher auch SCD-ScriptingCommandDispatcher 
-  * MultiTasking Verarbeitung von uP-Scripts (execute file.py) 
-  * Ausbau des Dispatchers mit neuen Commands: 
-    * UPS - Upload Python-Script <filename.py> 
-    * DPS - Download Python-Script <filename.py> 
-    * XPS - Execute Python-Script <filename.py> 
-    * APS - Abort (all) Python-Script(s) <none> 
-  * Ausbau des Dispatchers mit neuen LCDisplay-Commands: 
-    * WTD <r> <c> <t> - WriteTextDisplay Row Column Text 
-    * CLD - Clear Display 
-  * Ausbau des Dispatchers mit neuen Keyboard-Commands: 
-    * EKB - EnableKeyboard 
-    * DKB - DisableKeyboard 
-   
- 
- 
- 
-===== Entwicklungsschritte: ToDo ===== 
- 
- 
-==== Erweiterung ==== 
-  * **!!! OOO !!!** Schaltplan SCD 
-  * SDCard(Spi-Interface) an Esp32/MicroPython 
-  * MicroController UC als ChildProcessor an Uart (<->Esp32) 
- 
-==== 220101 : Zusammenführung ==== 
-  * PC(!): CommandDispatcher  
-    * Gui Tkinter mit Listbox, Terminal, CommandButtons 
-    * Command-Fifo 
-    * Definition Command-Software-Handshake 
-    * Test mit Esp32 : Esp32UdpClientServer02V01 
- 
-==== 2112XX - Esp32UnoBoard MicroPython : InterfaceCommandDispatcher ==== 
-  * CommandLineDispatcher für Uart, Bt, Wlan 
- 
-==== 211215 - Esp32UnoBoard MicroPython : CommandLineDispatcher ==== 
-  * X Neues Modul: CommandLineDispatcher 
-  * X CCommand, CDispatcher 
-  * **O** Analyse Command from received line 
-  * **O** Execute Command 
-  * **O** MultiLine-Fifo-Support (mit List []) 
- 
- 
-==== 211214 - MultiProcessExecution ==== 
-  * **X** Esp32-Plattform mit MicroPython 
-  * **X** Parallelisierung von MicroPython-Process-Scripten  
-  * **--** Esp32 mit MicroPython-CommandLine-Interfaces: Uart, Wlan, Bt | später auch Lan mit W5500 
-  * **O** MiroPython-Scripts: Upload / Download / Execute (in eigenem Thread mit System-Synchronistion) 
-  * **O** Erweiterung mit RealTime-Prozessoren (Stm32F407) unter Arduino-C++ 
-  * **O** Stm32: eine Uart zur bidirektionalen Kommunikation mit Esp32 (Uart2/3) 
-  * **O** eventuell zweiter Stm32 ebenfalls mit bidirektionaler Kommunikation mit Esp32 (Uart3/2) 
-  * **O** Esp32 -> Stm32: Durchreichen der Esp32-detektierten Commands (Uart, Wlan, Bt) zum Stm32 
-  * **O** Rückmeldung / SystemEvents Stm32 -> Esp32 -> Uart, Wlan, Bt 
- 
-==== Esp32: lokale Datenerfassung ==== 
-  * Kapselung aller System-Variablen (CpuTemperature,...) 
-  * Collector für Commands/Responses für lokale Hardware-Ressourcen(BreadBoard!): 
-    * LedSystem 
-    * LedQuad(Uart1, Wlan, Bt, (Lan)) 
-    * DHT22: Temperature/Humidity(CLK, DATA, 5V0, GND)    * Pressure/Humidity  
- 
-===== Entwicklungsschritte: Done ===== 
- 
-==== 220112 : Dispatcher ==== 
-  * Basis: 2201112144_Esp32ScriptingCommandDispatcher_00V02 
-  * Dispatcher soll CBfunction erhalten 
-  * If-Verteiler zur Ausführung von Commands 
-  * {{:project:SCD_ScriptingCommandDispatcher:2201121256_Esp32ScriptingCommandDispatcher_00V03.zip | 2201121256_Esp32ScriptingCommandDispatcher_00V03.zip}} 
- 
-==== 220111 : Zusammenführung Uart/Bt/Wlan ==== 
-  * Neues Projekt: ScriptingCommandDispytcher 
-  * Kopie aller letzten Uart/Bt/WlanUdp-Scripts in das neue SCD-Verzeichnis 
-  * Zusätze: Thread.py/Lines.py/Define 
-  * Version: {{:Project:SCD_ScriptingCommandDispatcher:2201112112_Esp32ScriptingCommandDispatcher_00V01.zip | 2201112112_Esp32ScriptingCommandDispatcher_00V01}} 
-  * Version mit Bt-Klassenaufspaltung: {{:Project:SCD_ScriptingCommandDispatcher:2201112144_Esp32ScriptingCommandDispatcher_00V02.zip | 2201112144_Esp32ScriptingCommandDispatcher_00V02}} 
-  * Uart-/Bt-/Wlan-Functions IsBusy(self) einführen und in MainLoop nur Abarbeitung, wenn alle Threads aktiv! 
- 
- 
- 
-==== 220111 : Bluetooth-Version ==== 
-  * Optimierung des SourceCodes: {{:module:micropython:Esp32BtThread:2201102238_Esp32BtTxRxLine_00V03.zip | 2201102238_Esp32BtTxRxLine_00V03.zip}} 
-  * Optimierung des SourceCodes: {{:module:micropython:Esp32BtThread:2201111247_Esp32BtTxRxLine_00V04.zip | 2201111247_Esp32BtTxRxLine_00V04.zip}} 
-  * mit Open/Close/Thread/RxTxLine: {{:module:micropython:Esp32BtThread:2201111645_Esp32BtTxRxLine_01V01.zip |2201111645_Esp32BtTxRxLine_01V01.zip}} 
-  * Version OOP aufgeräumt: {{:module:micropython:Esp32BtThread:2201111717_Esp32BtTxRxLine_01V02.zip |2201111717_Esp32BtTxRxLine_01V02.zip}} 
-  * funktioniert wiederholbar auf Android-Devices unter BT-Terminal 
- 
- 
-==== 220110 : Bluetooth-Version ==== 
-  * C++ BtSerial funktioniert mit Android- & Windows-Terminal 
-  * uP dagegen nur mit Android-Terminal 
-  * Suche nach Bt bzw. BtBle-Uart-Terminal-Example erfolglos: 
-  * aktuell nur BtUart über Android- (und nicht Win-/Lin-)Terminal benutzbar 
-  * keine Change, wenn mit BtDeviceNames oder UUIDs gespielt wird -  
-  * Reste lassen sich nur teilweise mit DeviceManager ShowHidden beseitigen! 
- 
-==== 220109 : Optimierte Einzelversionen ==== 
-  * neuer Projektname: Esp32UartTxRxLine 
-  * CUart: Thread: Open start / Close abort, lokale Thread-CB, external: OnTxLine, OnRxLine 
-  * CUart: Callback: OnTxLine, OnRxLine 
-  * CUart: Constructor: uartid, txpin, rxpin, ontxline, onrxline 
-  * CUart: Handler: Open, Close 
-  * CUart: Thread-Busy: 
-    * 0: RxData - convert/collect rxline 
-    * 1: first: RxData - callback 
-    * 2: second: TxData - send / callback 
-  * CUart: RxLine:  
-    * erste Möglichkeit: Rx-Callback definieren und damit automatisch (in CB) RxLine verarbeiten 
-    * zweite Möglickeit: (Rx-Callback == None) Pollen mit (0 < len(Uart.RxLine()))  
-  * CUart: TxLine: Senden von TxLines mit Uart.TxLine(txline) 
-  * {{:module:micropython:Esp32UartThread:2201091626_Esp32UartTxRxLine_01V01.zip | 2201091626_Esp32UartTxRxLine_01V01.zip}} 
-  * {{:module:micropython:Esp32WlanUdpThread:2201092059_Esp32WlanUdpTxRxLine_01V01.zip | 2201092059_Esp32WlanUdpTxRxLine_01V01.zip}} 
-  * {{:module:python:PcWlanUdpThread:2201092059_PcWlanUdpTxRxLine_01V01.zip | 2201092059_PcWlanUdpTxRxLine_01V01.zip}} 
-==== 220106 : BT-Dongle LogiLink und TP-Link  ==== 
-  * **XXX** Neue BT-Dongle LogiLink und TP-Link ausprobieren!!! 
-  * keine Änderung, ebenso kann Esp32BtUart nicht mit PC über UsbUart kommunizieren 
- 
-==== bis 220108 : Einstiegsversuche ==== 
-  * Versuch, alle lokalen Ressourcen einzubinden 
-    * 2112161443_Esp32LCDisplayI2C_01V01 
-    * 2112251413_Esp32DisplayKey_01V03 
-    * LedSystem 
-  * noch nicht verwendet: 2112312248_PcWlanUdpThread_01V01 
-  * Versuch, alle Interfaces einzubinden 
-    * 2112261253_Esp32UartThread_01V01 
-    * 2112271828_Esp32BtThread_01V04_onlyPhoneTablet 
-    * 2112312248_Esp32WlanUdpThread_01V01 
-    * erkannte Notwendigkeit: Uart/Bt/Wlan(/Lan) müssen gleiche CB-Struktur besitzen 
-    * daher Uart/Bt/Wlan in neuen Einzelversionen optimieren 
- 
-==== 220101 : SCD - ScriptingCommandDispatcher ==== 
-  * Esp32ScriptingCommandDispatcher 
-    * Übernahme Module 2112312248_Esp32WlanUdpThread_01V01 
-    * Umbenennen SCD 
-    *  
-  * Zwei neue Modul-Verzeichnisse (in Downloads/pathon): 
-    * PcScriptingCommandDispatcher 
-    * Esp32ScriptingCommandDispatcher 
-==== 220101 : Zusammenführung ==== 
-  * der bisherigen Ergebnisse (PC:Python - ESP32:MicroPython): 
-    * Pc/Esp32-Uart-Thread 
-      * PC-Terminal: {{https://www.der-hammer.info/pages/terminal.html | HTerm}} (Win & Lin) 
-      * {{:module:micropython:Esp32UartThread:2112261253_Esp32UartThread_01V01.zip | 2112261253_Esp32UartThread_01V01.zip}} 
-    * Pc/Esp32-Wlan(-Udp)-Thread 
-      * {{:module:python:PcWlanUdpThread:2112312248_PcWlanUdpThread_01V01.zip | 2112312248_PcWlanUdpThread_01V01.zip}}  
-      * {{:module:micropython:Esp32WlanUdpThread:2112312248_Esp32WlanUdpThread_01V01.zip | 2112312248_Esp32WlanUdpThread_01V01.zip}} 
-    * AndroidTablet/Esp32-Bt-Thread 
-      * {{https://play.google.com/store/apps | GooglePlay: suchen nach "Serial Bluetooth Terminal"}}     
-      * {{:module:micropython:Esp32BtThread:2112271828_Esp32BtThread_01V04_onlyPhoneTablet.zip | 2112271828_Esp32BtThread_01V04_onlyPhoneTablet.zip}} 
- 
-==== 211231 : PC/Esp32WlanUdpThread ==== 
-    * [[:Module:Python:PcWlanUdpThread:PcWlanUdpThread | PcWlanUdpThread]] korrespondierend mit 
-    * [[:module:micropython:Esp32WlanUdpThread:Esp32WlanUdpThread | Esp32WlanUdpThread]] 
- 
-==== 211228 : Heute ausschliesslich: Wlan-Udp-Communication ==== 
-    * Wiederherstellung der Projekte 
-      * Esp32, MicroPython: 2112131937_Esp32UdpClientServer_02V03 
-      * PC, Python:2112131938_UdpClientServer_02V03 
-    * Zusammenführung in Esp32WlanThread 
- 
-==== 211228 : Idee: zuerst mit neuen TPLink und LogiLink-BT-USB-Dongles Terminal-Communication ==== 
-    * zwischen PC und PC - Problem 
-    * zwischen PC und Phone/Tablet - ? 
-    * zwischen ESP32 und Phone/Tablet - ok 
-    * zwischen ESP32 und PC aufbauen - nicht reproduzierbare Probleme, abhängig vom Dongle-Typ 
- 
-==== 211227 : Bt-Dongles ==== 
-  * Auf allen möglichen Linux/Windows-Laptops habe ich mit eingebauten BT bzw. drangesteckten USB-BT-Dongles nur Probleme -  
-  * mal werden die ESP32-BT-Devices erkannt , mal nicht, der allergrösste SCHEISS 👎👎 
-  * Letzter Versuch: Kauf eines ORIGINAL Win10/BT4-USBDongles von LogiLink und von TP-Link, auf jeden Fall morgen erst einmal Wlan-Communication... 
- 
- 
-==== 211227 : GANZ WICHTIG: MicroPython-Example entsprechend C++ Esp32BluetoothSerial finden !!! ==== 
- 
- 
-==== 211227 : Esp32BtThread ==== 
-  * bisher ein völlig hoffnungsloser Kampf: 
-  * mit Handy / Tablet sieht die Et-Connection mittlerweise erfolgreich aus 
-  * mit PC überhaupt nicht👎👎👎 
-  * C++-Version Esp32BluetoothSerial funktioniert dagegen mit PC-Terminal - warum auch immer??!! 
-  * vermutlich Pairing in der MicroPython-Version anders als in C++-Library?! 
-  * Jetzt noch letzter Versuch, Esp32WlanThread entsprechend Esp32BtThread und Esp32UartThread zu programmieren... 
- 
-  * 211225: jetzt wieder Minimal-Multithreading mit Esp32-Uart-Wlan-Bt 
-  * parallele Command/Response Verarbeitung über alle In/Out-Interfaces 
-  * Basis-Minimal-Projekt: Esp32UartBtWlan (Multithreading) 
- 
-==== 211225 - Esp32DisplayKey ==== 
-    * Dual-Threading Display / Keyboard Application zur parallelen Verarbeitung von Esp32-IO 
-    * [[:module:micropython:Esp32DisplayKey:Esp32DisplayKey | Esp32DisplayKey]] BasisModul Esp32 mit LCDisplayI2C und Keyboard4x4(IOPins) mit Threading aber ohne CommandDispatcher 
- 
-==== 211214 - Esp32: Module: MultiProcessExecution ==== 
-    * gleichzeitig: Thread1: execfile('ProcessA.py') 
-    * und parallel: Thread2: execfile('ProcessB.py') 
-    * und Hauptprogramm ausführen lassen. 
-    * Ziel: CommandDispatcher (mit Threads Uart, Bt, Wlan, Lan) und 
-    * parallel execfile(commandscript.py) ausführen 
-    * [[:Module:MicroPython:MultiProcessExecution:MultiProcessExecution | MultiProcessExecution]]  
- 
-==== 211213 - Test PC <-> (Udp) <-> Esp32 ==== 
-    * Reduktion unnötiger Callback-Funktionen 
-    * PC: [[:Module:Python:UdpClientServer:UdpClientServer02V03 | UdpClientServer02V03]]  
-    * Esp32: [[:Module:MicroPython:Esp32UdpClientServer:Esp32UdpClientServer02V03 | Esp32UdpClientServer02V03]]  
- 
-==== 211212 - Esp32: Senden und Empfangen von UDP-Datenpaketen ==== 
-    * [[:Module:MicroPython:Esp32UdpClientServer:Esp32UdpClientServer02V01 | Esp32UdpClientServer02V01]] - Esp32 : UdpClientServer: Senden/Empfangen Udp-Data von PC (Thread, NonBlocking) 
-    * [[:Module:MicroPython:Esp32UdpClientServer:Esp32UdpClientServer01V01 | Esp32UdpClientServer01V01]] - Client- und Server-MicroPython-Script zum Empfangen / Senden von UDP-Daten 
-    * Esp32UnoBoard/MicroPython : Wlan / Scan 
-    * Transmit/Receive TextLines 
- 
-==== 211210 - PC: ESP32 ==== 
-  *[[:Module:Python:UdpClientServer:UdpClientServer | UdpClientServer - Senden und Empfangen von UDP-Datenpaketen]]  
-  * Transmit/Receive TextLines 
-  * [[:Module:Python:UdpClientServer:UdpClientServerUnidirectional | Unidirektionales Senden und Empfangen von UDP-Datenpaketen (NoBlocking)]] 
-  * [[:Module:Python:UdpClientServer:UdpClientServerBidirectional | Bidirektionales Senden und Empfangen von UDP-Datenpaketen (OOP, Threading, NoBlocking)]] 
- 
-  * Esp32 : Basis-Module 
-    * [[:Module:MicroPython:Esp32CheckThreading | Esp32UnoBoard/MicroPython : Threading [Esp32CheckThreading] ]] 
-    * [[:Module:MicroPython:Esp32CheckLedSystem | Esp32UnoBoard/MicroPython : Libraries [Esp32CheckLedSystem] ]] 
-    * [[:Module:MicroPython:Esp32CheckMath | Esp32UnoBoard/MicroPython : Libraries [Esp32CheckMath] ]] 
-    * Esp32UnoBoard mit MicroPython 
  
 ----- -----
project/scd_scriptingcommanddispatcher/scd-scriptingcommanddispatcher.1642961152.txt.gz · Last modified: 2022/01/23 20:05 (external edit)