News:

;) This forum is the property of Proton software developers

Main Menu

VIB coding Positron

Started by TimB, Jun 06, 2026, 03:42 PM

Previous topic - Next topic

TimB


A brief account of my experience with AI-assisted coding in Positron.

My first experiment came out of necessity. I was developing a controller that talks to an ESP32 master over RS485 and needed to test it — which meant emulating the ESP32 from a PC. Well outside my skill set. My son (a programmer who uses AI daily) suggested Claude in VS Code. I handed it my comms protocol and basic requirements, answered a few questions, and had a working Python app in under an hour. A couple of feedback rounds and it was solid. Impressed doesn't cover it.

Back to Positron for a while — bug fixing, adding features. Then I expanded the system significantly: two RS485 ports, full Modbus on both channels, and two pressure sensors that shared the same address. I needed a quick utility to display their output and reassign addresses. Ten minutes with Claude and the manufacturer's manual sorted it.

The tricky part came when those pressure sensors proved lightning-fast after the T3.5 wait. My direction-line release was polling a timer in a loop, arriving late, and garbling the data. I was out of timers and needed the release firing from an interrupt. Claude read my existing code, repurposed a timer, and wove it cleanly into the ISR. Tested and working first time.

I then asked it to comment the whole codebase. The result was excellent — fully annotated code plus a standalone document explaining the architecture to anyone needing to make future changes.

Next came the syringe pump firmware — and this time I was doing the Positron coding myself.
I can handle interrupts and comms well enough, but stepper acceleration with proper ramp-up and ramp-down had me going in circles. After spending too long trying to understand the theory I just cut to the chase: "Here's my code so far — write the rest so it talks the same protocol as the PC app."

It read what I had and wrote the sections I needed. I asked for more, it produced them. I won't pretend it gets everything right — it has limited Positron code to draw on — but between me catching syntax issues and occasionally asking it to fix them, we had working firmware in hours rather than the weeks it would normally take me.

That's really the point of this post. AI and Positron are a powerful combination. Don't dismiss it because your last experience was a year or two ago — it's moved on considerably. You still need to know what you're doing to review what it produces, but as a force multiplier it's remarkable.

My next experiment: point it at the Positron manual and see if it can answer questions like "what's the syntax for passing array addresses in a Proc call?"

If you got this far well done. You will know doubt be thinking he's made no typos and it makes sense, must have used AI to clean it up and you would be right

I include a couple of snaps of the PC apps produced
Screenshot 2026-06-06 162814.pngScreenshot 2026-06-06 162651.png

GDeSantis

I downloaded the Claude installer and asked:  "Are you familiar with Positron BASIC?"

This was the response:

Yes, I'm familiar with Positron BASIC! It's a BASIC compiler/development environment primarily designed for programming PIC microcontrollers (from Microchip Technology).

Here are the key things to know about it:
What it is Positron BASIC is a commercial BASIC compiler created by Les Johnson (and developed by protonbasic.co.uk / positron-basic.com). It's the successor/evolution of the Proton BASIC compiler.

Key features
Compiles BASIC code to native PIC machine code (very efficient output)
Supports a wide range of PIC devices (8-bit, 16-bit)
Includes a rich set of built-in libraries and hardware abstraction (UART, I2C, SPI, LCD, ADC, etc.)
Structured programming constructs (IF/THEN/ELSE, FOR/NEXT, WHILE/WEND, GOSUB, etc.)
Inline assembler support
Relatively easy to learn compared to writing assembly directly

Who uses it It's popular among hobbyists and embedded developers who want the productivity of a higher-level language while still targeting resource-constrained PIC microcontrollers.

IDE It comes with its own IDE (the Positron IDE), and the compiled output can be programmed onto PICs using tools like MPLAB IPE or PICkit programmers.

Is there something specific you'd like to know or work on with Positron BASIC — a project, a syntax question, a specific peripheral, or something else?

trastikata

I've downloaded it and it instantly asked for paid subscription  >:( , at least ChatGPT offered 1 month PRO free trial.

TimB


Yes I pay a subscription fee. Its £19 a month and just consider it a business expense. Considering the times it's saved me and how much I would have had to pay for the PC programs it's a real bargain.

CPR

TimB I couldn't agree more. I've used Gemini AI Pro with Positron (and other stuff) all with excellent results. I was so impressed when it additionally suggested further improvements to a piece of code that I then subscribed!

Gemini 3 AI


trastikata

#5
What I was surprised is that you can not test the plan before you pay for it in full, even one day trial subscription with credit card is sufficient for people interested in it to decide if it is worth or not and in the same time it will prevent abuse of the trial period.

I agree they save a lot of time and can help tremendously in organizing and improving code. Basically my negative reaction was towards their business model and not the benefits of that AI.