module:micropython:esp32uartpcuc:esp32uartpcuc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
module:micropython:esp32uartpcuc:esp32uartpcuc [2021/12/21 10:11] – [Beschreibung] omdevelop | module:micropython:esp32uartpcuc:esp32uartpcuc [2022/09/13 11:58] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== MicroPython: | + | ====== MicroPython: |
[[http:// | [[http:// | ||
[ | [ | ||
Line 8: | Line 8: | ||
] | ] | ||
- | ===== Übersicht ===== | + | ===== Übersicht ===== |
+ | |||
+ | ==== IT01 ==== | ||
+ | * **1** **2** **3** **4** | ||
+ | * **5** **6** **7** **8** | ||
+ | * **9** **A** **B** **C** | ||
+ | * **0** **S** **T** **N** | ||
+ | |||
+ | ==== Neues Modul: 4x4 KeyPad (entsprechend IT01-FrontKeys) ==== | ||
+ | * 8x IOPin: 4x Input(34, 35, 36, 39) und 4x Output(12, 13, 14, 27) | ||
+ | |||
+ | |||
+ | |||
+ | ==== LocalSystem ==== | ||
+ | |||
+ | * Kapselung aller System-Variablen (CpuTemperature, | ||
+ | * Collector für Commands/ | ||
+ | * LedSystem | ||
+ | * LedQuad(Uart1, | ||
+ | * LCDisplayI2C(PCF8574, | ||
+ | * Temperature / Humidity(DHT22: | ||
+ | * 4x4 KeyPad (entsprechend IT01-FrontKeys) | ||
+ | * Pressure/ | ||
+ | * GetChipID (Examples-Esp32-GetChipID) | ||
+ | |||
+ | |||
+ | ==== UCSystem ==== | ||
+ | * LCDisplayI2C((PCF8574, | ||
+ | * Quertz-Keyboard(PS/ | ||
+ | * Paul Stoffregen Arduino-Library **PS2Keyboard** | ||
+ | * {{https:// | ||
+ | |||
+ | ==== CommandReceiver(relative to Esp32) ==== | ||
+ | * PC-[Uart1]: Command< | ||
+ | * PC/ | ||
+ | * PC/ | ||
+ | * Extension later: PC-[Lan]: Command< | ||
+ | |||
+ | ==== Dispatcher(relative to Esp32) ==== | ||
+ | * LocalSystemDispatcher[Spi, | ||
+ | * ExternalControllerDispatcher[Uart2]: | ||
+ | ==== Dataflow ==== | ||
+ | |||
+ | < | ||
+ | | ||
+ | while (MainLoop): | ||
+ | # | ||
+ | # Esp32< | ||
+ | # | ||
+ | # From PC: receive command -> Pass to Local or UC as command | ||
+ | CommandLine = UartPC.ReadLine() # RxLines-Fifo | ||
+ | AnalyseCommandLine(CommandLine) # -> ChildUC | ||
+ | # # | ||
+ | # # Esp32< | ||
+ | # # | ||
+ | # CommandLine = BtPC.ReadLine() # RxLines-Fifo | ||
+ | # AnalyseCommandLine(CommandLine) # -> ChildUC | ||
+ | # # | ||
+ | # # Esp32< | ||
+ | # # | ||
+ | # CommandLine = WlanPC.ReadLine() # RxLines-Fifo | ||
+ | # AnalyseCommandLine(CommandLine) # -> ChildUC | ||
+ | # # # | ||
+ | # # # Esp32< | ||
+ | # # # | ||
+ | # # CommandLine = LanPC.ReadLine() # RxLines-Fifo | ||
+ | # # AnalyseCommandLine(CommandLine) # -> ChildUC | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # PC< | ||
+ | # | ||
+ | ResponseLine = LocalSystem.ReadLine() # RxLines-Fifo | ||
+ | UartPC.TransmitResponse(ResponseLine) | ||
+ | BtPC.TransmitResponse(ResponseLine) | ||
+ | WlanPC.TransmitResponse(ResponseLine) | ||
+ | LanPC.TransmitResponse(ResponseLine) | ||
+ | # | ||
+ | # Esp32< | ||
+ | # | ||
+ | ResponseLine = UartUC.ReadLine() # RxLines-Fifo | ||
+ | UartPC.TransmitResponse(ResponseLine) | ||
+ | BtPC.TransmitResponse(ResponseLine) | ||
+ | WlanPC.TransmitResponse(ResponseLine) | ||
+ | LanPC.TransmitResponse(ResponseLine) | ||
+ | # | ||
+ | </ | ||
+ | |||
==== Links ==== | ==== Links ==== | ||
Line 59: | Line 148: | ||
===== Entwicklung ===== | ===== Entwicklung ===== | ||
- | ==== 211219 | + | ==== 211221 |
- | * Version {{: | + | * |
- | ==== 211218 : Esp32Uart ==== | + | = |
- | * Uart0 (UsbPC) : Programmier-/ | + | |
- | * Uart1 (PIN_UART1_RX(25) rückgekoppelt mit PIN_UART1_TX(26)) | + | |
- | * Version {{: | + | |
- | |||
- | ** Esp32Uart.py : Senden/ | ||
- | <code python> | ||
- | >>> | ||
- | >>> | ||
- | CBOnTxLine[111asdf] | ||
- | CBOnRxLine[111asdf] | ||
- | CBOnTxLine[222asdf] | ||
- | CBOnRxLine[222asdf] | ||
- | CBOnTxLine[333asdf] | ||
- | CBOnRxLine[333asdf] | ||
- | *** CheckUart: end | ||
- | >>> | ||
- | </ | ||
- | |||
- | ==== 211217 : Erste Versuche ==== | ||
- | * Ausgliederung von [[: | ||
- | |||
- | **Uart-Pin-Assignment Esp32** in **Define.py** | ||
- | <code python> | ||
- | ID_UART0 | ||
- | PIN_UART0_TX = 1 # USB | ||
- | PIN_UART0_RX = 3 # USB | ||
- | # | ||
- | ID_UART1 | ||
- | PIN_UART1_RX = 25 # 9 - not usable | ||
- | PIN_UART1_TX = 26 # 10 - not usable | ||
- | # | ||
- | ID_UART2 | ||
- | PIN_UART2_RX = 16 | ||
- | PIN_UART2_TX = 17 | ||
- | </ | ||
----- | ----- | ||
[[http:// | [[http:// |
module/micropython/esp32uartpcuc/esp32uartpcuc.1640077890.txt.gz · Last modified: 2021/12/21 11:11 (external edit)