User Tools

Site Tools


module:micropython:esp32uartpcuc:esp32uartpcuc

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
module:micropython:esp32uartpcuc:esp32uartpcuc [2021/12/21 10:12] – [211217 : Erste Versuche] omdevelopmodule:micropython:esp32uartpcuc:esp32uartpcuc [2022/09/13 11:58] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== MicroPython: Esp32Uart ======+====== MicroPython: Esp32UartPCUC ======
 [[http://www.openhardsoftware.de/ | Open Hard- & Software]] [[http://www.openhardsoftware.de/ | Open Hard- & Software]]
 [ [
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/Responses für lokale Hardware-Ressourcen(BreadBoard!): 
 +    * LedSystem 
 +    * LedQuad(Uart1, Wlan, Bt, (Lan)) 
 +    * LCDisplayI2C(PCF8574, I2C) 
 +    * Temperature / Humidity(DHT22: CLK, DATA, 5V0, GND) 
 +    * 4x4 KeyPad (entsprechend IT01-FrontKeys) 
 +    * Pressure/Humidity 
 +    * GetChipID (Examples-Esp32-GetChipID) 
 + 
 + 
 +==== UCSystem ==== 
 +  * LCDisplayI2C((PCF8574, I2C) 
 +  * Quertz-Keyboard(PS/2, 5V, CLK, DATA, GND): 
 +    * Paul Stoffregen Arduino-Library **PS2Keyboard** 
 +    * {{https://www.pjrc.com/teensy/td_libs_PS2Keyboard.html|PS2Keyboard}} 
 + 
 +==== CommandReceiver(relative to Esp32) ==== 
 +  * PC-[Uart1]: Command<->Response 
 +  * PC/Tablet/Handy-[Wlan]: Command<->Response 
 +  * PC/Tablet/Handy-[Bt]: Command<->Response 
 +  * Extension later: PC-[Lan]: Command<->Response 
 + 
 +==== Dispatcher(relative to Esp32) ==== 
 +  * LocalSystemDispatcher[Spi, I2C, Gpio]:  
 +  * ExternalControllerDispatcher[Uart2]: Command<->Response 
 +==== Dataflow ==== 
 + 
 +<code> 
 +   MainLoop = True 
 +    while (MainLoop): 
 +        #-------------------------------------------------- 
 +        # Esp32<-Uart1-Usb<-PC 
 +        #-------------------------------------------------- 
 +        # From PC: receive command -> Pass to Local or UC as command 
 +        CommandLine = UartPC.ReadLine() # RxLines-Fifo 
 +        AnalyseCommandLine(CommandLine) # -> ChildUC 
 +        # #-------------------------------------------------- 
 +        # # Esp32<-Bt-Usb/Serial<-PC 
 +        # #-------------------------------------------------- 
 +        # CommandLine = BtPC.ReadLine() # RxLines-Fifo 
 +        # AnalyseCommandLine(CommandLine) # -> ChildUC 
 +        # #-------------------------------------------------- 
 +        # # Esp32<-Wlan<-PC 
 +        # #-------------------------------------------------- 
 +        # CommandLine = WlanPC.ReadLine() # RxLines-Fifo 
 +        # AnalyseCommandLine(CommandLine) # -> ChildUC 
 +        # # #-------------------------------------------------- 
 +        # # # Esp32<-Lan<-PC 
 +        # # #-------------------------------------------------- 
 +        # # CommandLine = LanPC.ReadLine() # RxLines-Fifo 
 +        # # AnalyseCommandLine(CommandLine) # -> ChildUC 
 +        # 
 +        # 
 +        #ResponseLine = '! command parameter0 .. parametern' # <- ChildUC 
 +        #-------------------------------------------------- 
 +        # PC<-Uart1/Bt/Wlan/Lan<-Esp32<-Local 
 +        #-------------------------------------------------- 
 +        ResponseLine = LocalSystem.ReadLine() # RxLines-Fifo 
 +        UartPC.TransmitResponse(ResponseLine) 
 +        BtPC.TransmitResponse(ResponseLine) 
 +        WlanPC.TransmitResponse(ResponseLine) 
 +        LanPC.TransmitResponse(ResponseLine) 
 +        #-------------------------------------------------- 
 +        # Esp32<->Uart2<->UC(Stm32) 
 +        #-------------------------------------------------- 
 +        ResponseLine = UartUC.ReadLine() # RxLines-Fifo 
 +        UartPC.TransmitResponse(ResponseLine) 
 +        BtPC.TransmitResponse(ResponseLine) 
 +        WlanPC.TransmitResponse(ResponseLine) 
 +        LanPC.TransmitResponse(ResponseLine) 
 +   # 
 +</code> 
 + 
  
 ==== Links ==== ==== Links ====
Line 61: Line 150:
 ==== 211221 : Basis ==== ==== 211221 : Basis ====
   *    * 
-==== 211218 : Esp32Uart ==== +=
-  * Uart0 (UsbPC) : Programmier-/Debug-Schnittstelle VSCode +
-  * Uart1 (PIN_UART1_RX(25) rückgekoppelt mit PIN_UART1_TX(26)) +
-  * Version {{:module:micropython:Esp32Uart:2112181850_Esp32Uart_00V01.zip | 2112181850_Esp32Uart_00V01.zip}} +
- +
- +
-** Esp32Uart.py : Senden/Empfangen bei Tx/Rx-Kabel-Rückkopplung:** +
-<code python> +
->>> Running c:\Downloads\python\Esp32Uart\Uart.py +
->>> *** CheckUart: begin +
-CBOnTxLine[111asdf] +
-CBOnRxLine[111asdf] +
-CBOnTxLine[222asdf] +
-CBOnRxLine[222asdf] +
-CBOnTxLine[333asdf] +
-CBOnRxLine[333asdf] +
-*** CheckUart: end +
->>> +
-</code> +
  
 ----- -----
module/micropython/esp32uartpcuc/esp32uartpcuc.1640077938.txt.gz · Last modified: 2021/12/21 11:12 (external edit)