| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| logicpython:index [2026/04/10 02:54] – [MDOBUS RTU Communication] admin | logicpython:index [2026/04/14 05:15] (current) – [Modbus RTU Communication] mfranklin |
|---|
| ====== LogicPython User Documentation ====== | ====== LogicPython ====== |
| |
| LogicPython is a browser-based Python development environment for RP2350 hardware. | LogicPython is a browser-based Python development environment for microcontrollers. |
| The target device must be an RP2350-based device with LogicPython firmware installed. | The target device must be a microcontroller board device with LogicPython firmware installed. |
| You can edit code, deploy to the device, run programs, monitor output, and use AI-assisted editing. | You can edit code, deploy to the device, run programs, monitor output, and use AI-assisted editing. |
| |
| ===== CUBLOC API Reference ===== | ===== CUBLOC API Reference ===== |
| |
| The CUBLOC API pages are grouped by category. Each entry links to a dedicated page and includes a short description. | LogicPython includes a [[cubloc:index|CUBLOC]] API for those who wish to leverage their familiarity with the [[cubloc:index|CUBLOC]] platform. |
| |
| ==== Analog Input ==== | ==== Analog Input ==== |
| ==== Memory and Storage ==== | ==== Memory and Storage ==== |
| |
| * [[logicpython:cubloc_api:eeread|EERead]] - Read bytes from per-''address'' backing files named like _ee_0000. | * [[logicpython:cubloc_api:eeread|EERead]] - Read data from a non-volatile memory. |
| * [[logicpython:cubloc_api:eewrite|EEWrite]] - Write bytes into per-''address'' backing files named like _ee_0000. | * [[logicpython:cubloc_api:eewrite|EEWrite]] - Write data to a non-volatile memory. |
| |
| |
| ==== PWM and Counters ==== | ==== PWM ==== |
| |
| * [[logicpython:cubloc_api:pwm|Pwm]] - ''Output'' a PWM waveform on the specified ''channel''. | * [[logicpython:cubloc_api:pwm|Pwm]] - ''Output'' a PWM waveform on the specified ''channel''. |
| * [[logicpython:cubloc_api:pwmoff|PwmOff]] - Stop PWM output on the specified ''channel''. | * [[logicpython:cubloc_api:pwmoff|PwmOff]] - Stop PWM output on the specified ''channel''. |
| |
| ==== MDOBUS RTU Communication ==== | ==== Modbus RTU Process ==== |
| |
| * [[logicpython:cubloc_api:opencom|OpenCom]] - Enable serial communication on a CUBLOC-style ''channel''. | |
| * [[logicpython:cubloc_api:setmodbus|SetModbus]] - Start the LogicPython Modbus RTU slave worker using a pre-opened UART ''channel''. | * [[logicpython:cubloc_api:setmodbus|SetModbus]] - Start the LogicPython Modbus RTU slave worker using a pre-opened UART ''channel''. |
| |
| |
| |
| ==== System and Debug ==== | |
| |
| * [[logicpython:cubloc_api:debug|Debug]] - Print debug ''values'', interpreting CUBLOC debug control codes. | |
| * [[logicpython:cubloc_api:setdebug|SetDebug]] - Enable or disable ''Debug'' output. | |
| * [[logicpython:cubloc_api:setonglobal|SetOnGlobal]] - Enable or disable CUBLOC-style global interrupt handling. | |
| * [[logicpython:cubloc_api:sys|Sys]] - Return a supported CUBLOC system status value. | |
| * [[logicpython:cubloc_api:time|Time]] - Read system RTC values for addresses 10 through 13. | |
| |
| ==== Timing and Delays ==== | |
| |
| * [[logicpython:cubloc_api:delay|Delay]] - ''Delay'' execution for the given number of ''milliseconds''. | |
| * [[logicpython:cubloc_api:ontimer|OnTimer]] - Register a periodic timer ''callback'' using CUBLOC ''OnTimer'' semantics. | |
| * [[logicpython:cubloc_api:pause|Pause]] - ''Pause'' execution for the given interval in ''milliseconds''. | |
| * [[logicpython:cubloc_api:setontimer|SetOnTimer]] - Enable or disable execution of callbacks registered with ''OnTimer''. | |
| * [[logicpython:cubloc_api:udelay|UDelay]] - ''Delay'' execution for the given number of ''microseconds''. | |
| * [[logicpython:cubloc_api:wait|Wait]] - ''Delay'' execution for the given interval in ''milliseconds''. | |
| |
| |