User Tools

Site Tools


module:micropython:esp32uartpcuc:esp32uartpcuc

This is an old revision of the document!


MicroPython: Esp32UartPCUC

Übersicht

Dispatcher

  • LocalSystemDispatcher
  • ExternalControllerDispatcher

Dataflow

   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)
   #

Version

Beschreibung

Ausgabe MicroPython-Terminal Esp32CheckUart.py

 

Main-Program: Esp32CheckUart.py

 

Library-Module: Uart.py

 

Library-Module: Thread.py

 

Library-Module: Lines.py

 

Library-Module: Define.py

#
ID_UART0     =  0
PIN_UART0_TX =  1 # USB
PIN_UART0_RX =  3 # USB
#
ID_UART1     =  1
PIN_UART1_RX = 25 #  9 - not usable 
PIN_UART1_TX = 26 # 10 - not usable 
#
ID_UART2     =  2
PIN_UART2_RX = 16
PIN_UART2_TX = 17
#

Entwicklung

211221 : Basis

module/micropython/esp32uartpcuc/esp32uartpcuc.1640166948.txt.gz · Last modified: 2021/12/22 11:55 (external edit)