====== CRB - ControllerRingBus ====== ===== Übersicht ===== * Nach Fertigstellung der Scriptor-Funktion (ausschliesslich in MicroPython) im Projekt: SCD_ScriptingCommandDispatcher nun * Erstellung der SCD-Funktionalität unter C++: * Direktes Umschreiben aller uP-Classes in C++-Classes ===== ToDo ===== ===== Done ===== ==== 220415 : Aufspaltung in zwei Teil-Module: ==== * [[:Module:CRB_ControllerRingBus:Stm32F103CrbServoMotor | Stm32F103CrbServoMotor]] * [[:Module:CRB_ControllerRingBus:PcCrbServoMotor | PcCrbServoMotor]] ==== 220405 : Minimalsystem: Stm32F103LedMotorMinimal ==== ==== 220404 : Minimalsystem: Stm32F103PwmMotorMinimal ==== * Ergebnis: {{2204041800_Stm32F103PwmMotorMinimal_01V01_6pwm | 2204041800_Stm32F103PwmMotorMinimal_01V01_6pwm.zip}} ==== 220404 : Minimalsystem: Stm32F103LedMotorServo ==== * Separates Modell zur Demonstartion der Kommunikation PCLedMotorServo(Python, GUI) - UartCB - Stm32F103LedMotorServo(C++) * Zutaten Stm32F103 * VSCode, C++ * PVC-Platte (für Fixierung mit Heissklebepistole) * Breadboard 400 mit PowerSupply und 9V-Steckernetzteil * Stm32F103C8T6 * zwei Servos mit Ruderhörnern * zwei DCMotoren (RRC gelb) mit EncoderScheiben * zwei LM393-Encoder-Module * zwei MotorDriver-Module MX1508 * Zutaten PC: * Anaconda, Spyder, Python, PySerial * Schaltplan ==== 220404 : Umschreibung Dataflow Stm32F103ControllerRingBus ==== * Aktionen -> Dispatcher * LedSystem - keine Funktion * MotorLeft * MotorLeft_OnMovePositive, Dispatcher -> Set+/-Stop * MotorLeft_OnMoveNegative, * MotorLeft_OnStop, * MotorRight * MotorRight_OnMovePositive, Dispatcher -> Set+/-Stop * MotorRight_OnMoveNegative, * MotorRight_OnStop, * ServoLeft * ServoLeft_OnSetPosition, Dispatcher -> SetPWM * ServoRight * ServoRight_OnSetPosition); Dispatcher -> SetPW * Reaktionen -> On... : nur ausserhalb von Dispatcher ==== 220403 : Beschreibung Dataflow Stm32F103ControllerRingBus ==== * Motor - MoveForward (Dispatcher, Command) : "@ST C P" == "@PD MMP pwm" * LocalDevice Motor : SetPWM(pwm) -> OnMotorStateChanged, OnMotorVleocityChanged * Response : "$ST C 1 P" -> next Command * OnMotorStateChanged(state) -> Event "!ST MS state" -> PC-Gui * OnMotorVelocityChanged -> Event "!ST MV pwm" -> PC-Gui Wohin kommen die CB-Funktionen???? CDispatcher Dispatcher(// UartPC UartPC_OnTxLine, UartPC_OnRxLine, // NOD! Main - Uart.Execute/OnRx/TxLine // LedSystem LedSystem_OnStateChanged, // NOD! SetState -> LedSystem_OnSetOn, LedSystem_OnSetOff, // Dispatcher -> SetOn/Off // MotorLeft MotorLeft_OnStateChanged, // NOD! MotorLeft_OnVelocityChanged, // NOD! MotorLeft_OnMovePositive, // Dispatcher -> Set+/-Stop MotorLeft_OnMoveNegative, MotorLeft_OnStop, // MotorRight MotorRight_OnStateChanged, // NOD! MotorRight_OnVelocityChanged, // NOD! MotorRight_OnMovePositive, // Dispatcher -> Set+/-Stop MotorRight_OnMoveNegative, MotorRight_OnStop, // ServoLeft ServoLeft_OnStateChanged, // NOD! ServoLeft_OnSetPosition, // Dispatcher -> SetPWM // ServoRight ServoRight_OnStateChanged, // NOD! ServoRight_OnSetPosition); // Dispatcher -> SetPWM ==== 220401 : Erweiterung Stm32F103ControllerRingBus ==== * zusammenführung: * 2203251115_Stm32F103ControllerRingBus_00V06 (Weiterführung, aktuelle Version) * 2204011412_Stm32F103PwmTest_01V03_6pwmchannel * Stm32F103ControllerRingBus: LedSystem, MotorLeft/Right, ServoLeft/Right ==== 220331 : Versuche mit Stm32F103PwmTest ==== * Vergleiche: [[:module:arduino:pulsewidthmodulation:stm32f103pwmtest:stm32f103pwmtest | Stm32F103PWMTest]] ==== 220324 : CRB - ControllerRingBus ==== * Callback OnRx/TxLine * Übernahme MicroPython-Sources aus: "2203190924_RPiPicoSCDScriptor_01V30" ==== 220323 : Second Tries ==== * Print, Serial * Format Double/Float * Umbennung auf: **CRB - ControllerRingBus** * Version: 2203240732_Stm32F103ControllerRingBus_00V03 ==== 220322 : First Tries ==== * C++ : Callback * Classes * Wichtig: "Uart.h/.cpp" müssen auf "CUart.h/.cpp" umbenannt werden, sonst Compile-Error!!! [env:genericSTM32F103C8] platform = ststm32 board = genericSTM32F103C8 framework = arduino debug_tool = stlink upload_protocol = stlink build_flags = -fexceptions Section in "platformio.ini", "-fexceptions" für try/catch(int exception)