The Senbrino logo, mark of the ladder PLC tool for Arduino

Part 3 is the program. Ask the AI for a ladder in one line, deploy it to the board, and move a relay.

What you need

ItemDetail
ProjectTest from Part 2, with main board GO-RP2040-CB08 and the port already set
BoardUSB and DC 24 V connected, buttons on IN01 and IN02
Claude CodeInstalled and logged in as in Part 1

1. Open the Claude console

ModeWhen
1. AI modeThe AI runs everything from interview to verification step by step and asks for approval at each step
2. Assistant modeAsk and it edits right away. This is the one used here

When the Mode field at the top of the AI page reads Assistant Mode, you are ready.

2. Ask for the ladder in one line

On main board GO-RP2040-CB08, make a latching circuit: pressing IN01 turns OUT1 on, pressing IN02 turns it off.
Three seconds after OUT1 comes on, turn OUT2 on as well. Use the I/O mapping for addresses (inputs P0-P3, outputs P4-P7).

Entering the request in the Claude console and watching symbols and ladder get generated

When it finishes, open Symbols and Ladder in the left menu and check that the result matches what is below.

Symbols

The symbols page with BTN_ON P0, BTN_OFF P1, OUT1 P4, OUT2 P5, M_Run M0 and T_OUT2_DLY T0 added

NameAddressRole
BTN_ONP0IN01 start button
BTN_OFFP1IN02 stop button
OUT1P4OUT1 relay
OUT2P5OUT2 relay
M_RunM0Run state
T_OUT2_DLYT03-second timer

Ladder

The generated four-rung ladder: latch, OUT1 output, TON 300 delay, OUT2 output

RungContent
1BTN_ON or M_Run → BTN_OFF NC contact → M_Run. Stop-priority latch
2M_Run → OUT1
3M_Run → TON(T_OUT2_DLY, 300). 10 ms × 300 = 3 s
4T_OUT2_DLY → OUT2

3. Deploy

Status barMeaning
Building…Converts the ladder to Arduino code and compiles it
Uploading… (COM17)Uploads over the port picked in Part 2. The port number differs from PC to PC
Upload succeeded. The board is booting the new firmware.The board runs the program

The first deploy

The first time you click Deploy, two windows come up one after the other before the build. They do not appear again.

WindowButtonWhat it installs
Install arduino-cliInstallarduino-cli, the compile and upload tool
Install CoreOKThe rp2040:rp2040 board core. Takes from tens of seconds to a few minutes

4. Check it in the monitor

In the monitor, pressing BTN_ON turns M_Run and OUT1 on, and OUT2 comes on 3 seconds later

ActionResult
Press IN01M_Run and OUT1 ON. The OUT1 relay closes
3 seconds passThe timer value reaches 300 and OUT2 goes ON. The OUT2 relay closes
Press IN02Everything OFF

Recap

PartWhat you did
Part 1Installed the editor and Claude Code
Part 2Wired the buttons, set the main board and port
Part 3Ladder from AI, deploy, monitor