Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:54 15 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Programming direction

     Page 1 of 2    
Author Message
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 622
Posted: 06:12am 10 Nov 2025
Copy link to clipboard 
Print this post

What is a good direction to go, when a project reaches a turnover point ?

Eg  a project written in C has achieved the main aims/tasks. To go further it
would need some graphics, a gui and common hardware, on say a PC or phone.
One option is the windos track and wrap it up with OpenGL or similar. A complex
and involved task but a slick result.
Another might be, use an old java and say Swing for the UI. Runs on most things but
much easier but risky re bugs, security, maybe fees for use and so on. Would need
significant alteration. Hmmm.

I have to admit my interest in this stage of projects diminishes a lot and
my monkey-brain looks for novel tech fixes     Maybe a break and a cool drink
will help (I can talk myself into that one    )
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10582
Posted: 08:06am 10 Nov 2025
Copy link to clipboard 
Print this post

Compile the code with emscripten and get an AI to write a web gui which would then be usable on anything. AIs are great at web stuff.
Ask any decent AI to create an example project for you and you will get the complete workflow needed.
Edited 2025-11-10 18:11 by matherp
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1637
Posted: 10:47pm 10 Nov 2025
Copy link to clipboard 
Print this post

Only one response?

Personally, I believe that times have never been more exciting and opportunity abounds.

The PicoMite is without doubt, the best thing happening in the MCU world but that world is dominated by sheeple who don't wanna be associated with "BASIC"

They are pathetic wimps.

Response to my understanding of the question and with utmost respect to matherp:

aFox is the Android-world equivalent of matherp. Basic interpreter that can be coded on the Android device. Absolute child's play and anything that you can dream of is easily accomplished.

As one who has been self employed since 1988, I have always looked for RAD (rapid application development tools) but where I didn't need to compromise on performance...The tools are out there but the brainwashed idiots will turn up their noses and happily accept a life of mediocrity (slavery)

Perfect example: The Emperor's New Clothes by Hans Christian Anderson.

A marriage of MMBASIC and the original OR derivative (OliBasic/HBasic) could easily solve sooo many ridiculous problems in the controls industry.

My preference is OliBasic (aFox).

MMBasic programming isn't work, it's a delight and so is OliBasic on Android.

Think and do...worry more about what to do and less of how to do.

Brainwashed morons will continue to follow the horse doo-doo narrative and fail. So we step in with a ridiculously capable MCU and a stunning HMI that will run on the device in your pocket.

Opportunity abounds  





"Time is money" is absolutely true when you have no salary but a family to support.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8293
Posted: 10:35am 11 Nov 2025
Copy link to clipboard 
Print this post

I'll bite.  :)
These are just my own opinions of what I generally consider to be "safe working practices" in programming.

It all depends on the final application. You have to think globally if you want to get it right. If the application is primarily for the easiest use by non-technical people then you start by designing the UI, your functional code can wait. It has to be driven by the user. On the other hand, if your final application is for embedded control then the most important thing is to make and keep lots of detailed documentation as you may need to either update the application or modify it for different mechanical hardware at a later time. There is no user interface to bother about.

Personally I don't like the idea of developing the operating side without considering how the user interface is going to work right from the start. You see it around but you usually end up with something where the user can't have some of the functions that the original code is/was capable of. If there is a user interface at all then remember that the user is in control and your operating code isn't allowed to do things that they aren't expecting or that they have no control over, with the exception of things like emergency shutdowns or interlocks - but the user must still be given error messages to show why they have happened.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Wolfgang
Regular Member

Joined: 03/11/2021
Location: Germany
Posts: 63
Posted: 11:38am 11 Nov 2025
Copy link to clipboard 
Print this post

How can one display the current programme version on the display without having to enter it explicitly oneself?

In Bascom for e.g Atmega from MCselec, there is a special command for this. The command "Version(3)" outputs the string under which the programme was saved during runtime.

Is there something equivalent for Pico-Basic?


Wolfgang
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4142
Posted: 11:45am 11 Nov 2025
Copy link to clipboard 
Print this post

MM.VER maybe?

It's now the same as MM.INFO(VERSION) I see from the manual.

John
 
Wolfgang
Regular Member

Joined: 03/11/2021
Location: Germany
Posts: 63
Posted: 12:28pm 11 Nov 2025
Copy link to clipboard 
Print this post

Hello JohnS,

I think the MM.INFO(Version) does not that what I want.
I suppose it shows the version of the interpreter. And my programm reports

Error: "Expected a string", when I insert the following where version_name was Dimmd as String.

version_name=MM.INFO$(VERSION)


That what I wish is, that the filename under which my programm was saved, is useable in my programm to show it on my display.

What I not want is, inserting that filename by myself into my programm.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1637
Posted: 12:30pm 11 Nov 2025
Copy link to clipboard 
Print this post

  Quote  It all depends on the final application. You have to think globally if you want to get it right. If the application is primarily for the easiest use by non-technical people then you start by designing the UI, your functional code can wait


Absolutely   The importance of a happy operator cannot be overstated. They actually have influence when it comes to future business.
Let it run for awhile and then contact the operator directly and asks what he doesn't like. They encounter stuff that we didn't consider. Fix it and you have a friend for life.

  Quote  but the user must still be given error messages to show why they have happened.


Another pet peeve of mine. I received a call about a machine that I was only vaguely familiar with and it had a Windows front end. "We are getting Error 0315, do you have any idea what this means?"

Are you kidding me...A full-blown computer that only provides error numbers that you need to look-up in the user manual (that can never be found)

Imagine a simple embedded application that only requires a PicoMite HDMI/USB.

The maintenance tech being able to connect a monitor, keyboard, mouse and getting a full description of the machine fault, suggested troubleshooting procedure, schematics, spare parts list, including sources.

And informative images such as:







No messing around finding that old XP laptop with the valid programming license and that proprietary RS485 cable with the obscure connector to interrogate some obsolete controller.

Possibilities are endless  
Edited 2025-11-11 22:48 by PhenixRising
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4142
Posted: 01:04pm 11 Nov 2025
Copy link to clipboard 
Print this post

MM.INFO$(CURRENT)

John
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3475
Posted: 01:17pm 11 Nov 2025
Copy link to clipboard 
Print this post

PicoMite MMBasic RP2350A V6.01.00b16
Copyright 2011-2025 Geoff Graham
Copyright 2016-2025 Peter Mather

> ?mm.info$(version)
6.010016
> a$=mm.info$(version)
Error : Expected a string
> a$=str$(mm.info$(version))
> ?a$
6.010016
> ?mm.info$(current)
NONE
> ?mm.ver
6.010016
> ?mm.device$
PicoMite RP2350A
>

Edited 2025-11-11 23:21 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4142
Posted: 03:04pm 11 Nov 2025
Copy link to clipboard 
Print this post

current is NONE as you have no program

John
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3475
Posted: 04:10pm 11 Nov 2025
Copy link to clipboard 
Print this post

  JohnS said  current is NONE as you have no program


Right.
> load "distortion.bas"
> ?mm.info$(current)
A:/distortion.bas

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Wolfgang
Regular Member

Joined: 03/11/2021
Location: Germany
Posts: 63
Posted: 04:44pm 11 Nov 2025
Copy link to clipboard 
Print this post

@lizby, @JohnS

thanks for your support.

Okay, that listing makes sense now.
But the result of that type of commands delivers the version-number of the interpreter, not the filename, so I understand that there is no special command that insert the programme's filename which was saved, as it is with AVR/Atmega/Bascom.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 8293
Posted: 05:02pm 11 Nov 2025
Copy link to clipboard 
Print this post

The program wouldn't know it as the filename isn't saved as part of the program. You can hack it, probably, but I doubt if there's all that much use for it. After all, you loaded the program therefore you know what you loaded. ;)

With a compiler you may well want to keep the filename on the target device. An interpreter is more transient.

On the PicoMite you can tell which flash slot the program was loaded from, so if you have, say, two versions of a program with the same filename each one can tell which one it is.
.
Edited 2025-11-12 03:04 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4142
Posted: 05:05pm 11 Nov 2025
Copy link to clipboard 
Print this post

  Wolfgang said  I understand that there is no special command that insert the programme's filename which was saved, as it is with AVR/Atmega/Bascom.

I'm confused - what do you want that mm.info$(current) does not do?

John
 
Wolfgang
Regular Member

Joined: 03/11/2021
Location: Germany
Posts: 63
Posted: 05:33pm 11 Nov 2025
Copy link to clipboard 
Print this post

@JohnS

As a hobbyist, I have a lot of different programmes that I want to edit or need to edit after one or more years, or even after changing PCs.

To make it easier to find the right file in my numerous amount of folders, I have always displayed the filename with date on the display or output it by the serial interface at the beginning of that programm start.

That was the only reason. This has been and continues to be helpful with Bascom/AVR/Atmega.
Edited 2025-11-12 03:34 by Wolfgang
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3475
Posted: 06:35pm 11 Nov 2025
Copy link to clipboard 
Print this post

> save "distortion.bas"
> run
A:/distortion.bas 11-11-2025 14:37:22
> list
' distortion.bas
Print MM.Info(current);" ";Date$;" ";Time$

CLS
For y=0 To MM.VRES Step 2
For x=0 To MM.HRES Step 32
  If (x And 32)Xor(y And 32) Then
    GUI Bitmap x,y,&hBBBBBBBBEEEEEEEE,32,2
  Else
    GUI Bitmap x,y,&h4444444411111111,32,2
  EndIf
Next
Next
For y=1 To 14
For x=1 To 19
  c=(x+y+(x>5)+(x>14)+(y>4)+(y>11)+1)Mod 2
'   Line 32*x-8,32*y-2,32*x+8,32*y-2,4,c
'   Line 32*x-2,32*y-8,32*x-2,32*y+8,4,c
  Line 32*x-8,32*y-2,32*x+8,32*y-2,4,Choice(c,&HFFFFFF,0)
  Line 32*x-2,32*y-8,32*x-2,32*y+8,4,Choice(c,&HFFFFFF,0)
Next
Next
>




~
Edited 2025-11-12 04:46 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Wolfgang
Regular Member

Joined: 03/11/2021
Location: Germany
Posts: 63
Posted: 09:40pm 11 Nov 2025
Copy link to clipboard 
Print this post

@lizby

many thanks:
okay, thats a solution to print out which file and dates
Wolfgang
 
zeitfest
Guru

Joined: 31/07/2019
Location: Australia
Posts: 622
Posted: 11:35am 14 Nov 2025
Copy link to clipboard 
Print this post

Thank you  

Your responses are three excellent cornerstones !
Particularly to guide programs with UIs.


1) keep the UI and operations inter-applicable and synchronized.
2) the user is the judge ! Keep getting feedback from users as it develops.
3) keep the project compatible with the future - Use AI to automatically generate  
code.

I think in general AI will work well using known constructs particularly GUI elements, it certainly looks a good way to construct things, I haven't done the learning curve yet though.
Now that enscripten and webassembly handle doble precision (64 bits) that is intriguing.
Seeing many compilers are going to LLVM (low level virtual machine) output I guess there will be convergence.


My (ancient) project originally used graphic plotting so was sort-of GUI based  but I did not keep that aspect of it going while I completed the operations. A mistake but something to fix    
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1637
Posted: 02:28pm 14 Nov 2025
Copy link to clipboard 
Print this post

Liquid Basic claims to incorporate AI.

Only had a quick look but I couldn't find any mention of COM port support so I lost interest.
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025