Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 03:13 23 May 2026 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 : MMBasic V6.03.00 release candidates

     Page 10 of 10    
Author Message
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 637
Posted: 02:31pm 22 May 2026
Copy link to clipboard 
Print this post

Here's the latest on the Pimoroni errors:

The problem with the system rebooting after editing a file seems to be a combination of  having both WiFi and PSRAM active at the same time. If I disable either one or both, then I don't get errors. Right now, I'm prioritizing PSRAM so WiFi access is turned off on my two PicoCalc systems. The Pimoroni Pico Plus 2 W has more features than the Raspberry Pi Pico 2W but it seems less stable when overclocked.
Edited 2026-05-23 02:14 by toml_12953
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11352
Posted: 05:13pm 22 May 2026
Copy link to clipboard 
Print this post

V6.03.00RC11
PicoMiteRP2040V6.03.00RC11.zip
PicoMiteRP2350V6.03.00RC11.zip

Changes to all VGA and HDMI versions.
See demo

Fix for I2C bug
Timing change to WebMite RP2350

All VGA versions:
Implementation of new command
GUI CURSOR
The GUI CURSOR command provides a mechanism for displaying and
manipulating a cursor on the screen. The cursor sits above all other graphics
and nothing can overwrite it.

GUI CURSOR ON [cursorno [,x, y [,cursorcolour] ] ]
Cursor no can be 0 (Default: mouse type pointer) or 1 (cross), in addition the
user can load his own cursor using a SPRITE look-alike file in which case
this is cursor no. 2 For cursor numbers 0 and 1 the programmer can override
the default white cursor by specifying the colour in the open command.

GUI CURSOR x, y
Moves the cursor to x, y. Does not display the cursor if hidden but just
updates the location.

GUI CURSOR OFF
Turns off the cursor

GUI CURSOR HIDE
Hides the cursor but maintains its position

GUI CURSOR SHOW
Shows a hidden cursor in its stored position

GUI CURSOR COLOUR cursorcolour
Changes the colour of cursor number 0 or 1. Does not impact loaded cursors
where its colours are specified by the cursor designer

GUI CURSOR LOAD "fname"
Loads a user cursor from a file in the Maximite sprite format with a minor
change. The header is now Width, Height, Xoffset, Yoffset. The two offsets
determine where on the cursor the pointer is defined to be. So the mouse
cursor has offsets 0,0 and the cross has offsets 7,7

GUI CURSOR LINK MOUSE
GUI CURSOUR UNLINK
MOUSE
These commands link and unlink mouse activity to the cursor. When linked
the cursor will automatically track the mouse activity. The mouse must be
opened using the CONTROLLER MOUSE OPEN command before the
cursor is linked.

VGA and HDMI RP2350 versions
Full GUI command support including new function CLICK (same as CMM2). Note this command effectively substitutes for the TOUCH function when using an touch LCD screen

CLICK(DOWN)
Will return true if the screen is currently being clicked on using the mouse.

CLICK(UP)
Will return true if the screen is currently NOT being clicked on.

CLICK(LASTX)
Will return the X coordinate of the last location that was clicked on.

CLICK(LASTY)
Will return the Y coordinate of the last location that was clicked on.

CLICK(REF)
Will return the reference number of the control that is currently being clicked
on or zero if no control is currently being clicked on.

CLICK(LASTREF)
Will return the reference number of the last control that was clicked on.

Demo program as per the video
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Demonstration program for the Advanced Graphics
' Rescaled for 640x480 display
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Option Explicit
Dim ledsY

MODE 3
Option Console Serial
Colour RGB(white), RGB(black)

' reference numbers for the controls are defined as constants
Const c_head = 1, c_pmp = 2, sw_pmp = 3, c_flow = 4, tb_flow = 5
Const led_run = 6, led_alarm = 7
Const frm_alarm = 20, nbr_hi = 21, nbr_lo = 22, pb_test = 23
Const c_hi = 24, c_lo = 25
Const frm_pump = 30, r_econ = 31, r_norm = 32, r_hi = 33
Const frm_log = 40, cb_enabled = 41, c_fname = 42, tb_fname = 43
Const c_log = 44, cb_flow = 45, cb_pwr = 46, cb_warn = 47
Const cb_alarm = 48, c_bright = 49, sb_bright = 50

Dim Integer x, y, lb, rb, sb, xs, ys, cs, ss

GUI Cursor On 0, MM.HRES\2, MM.VRES\2
GUI cursor link mouse
GUI Interrupt TouchDown, TouchUp

' =========================
' Heading
' =========================
Font 2, 2
GUI Caption c_head, "Pump Control", 10, 0

' =========================
' Pump section
' =========================
Font 4
GUI Caption c_pmp, "Pump", 15, 45, , RGB(brown)

GUI Switch sw_pmp, "ON|OFF", 15, 70, 120, 40, RGB(white), RGB(brown)
CtrlVal(sw_pmp) = 1

Font 4
GUI Caption c_flow, "Flow Rate", 15, 130, , RGB(brown), 0

Font 4
GUI Displaybox tb_flow, 15, 155, 120, 38
CtrlVal(tb_flow) = "20.1"

' =========================
' Power frame and radios
' =========================
Font 4
GUI Frame frm_pump, "Power", 15, 225, 145, 120, RGB(200,20,255)

GUI Radio r_econ, "Economy", 30, 248, 15, RGB(230,230,255)
GUI Radio r_norm, "Normal", 30, 278
GUI Radio r_hi, "High", 30, 308

CtrlVal(r_norm) = 1

' =========================
' Alarm frame
' =========================
Font 4
GUI Frame frm_alarm, "Alarm", 180, 180, 170, 165, RGB(green)

GUI Caption c_hi, "High:", 192, 215, LT, RGB(yellow)

GUI Numberbox nbr_hi, 255, MM.Info(VPOS)-6, 75, MM.Info(FontHeight)+10, RGB(yellow), RGB(64,64,64)

GUI Caption c_lo, "Low:", 192, 260, LT, RGB(yellow), 0

GUI Numberbox nbr_lo, 255, MM.Info(VPOS)-6, 75, MM.Info(FontHeight)+10, RGB(yellow), RGB(64,64,64)

GUI Button pb_test, "TEST", 215, 300, 100, 32, RGB(yellow), RGB(red)

CtrlVal(nbr_lo) = 15.7
CtrlVal(nbr_hi) = 35.5

' =========================
' LEDs
' =========================
Const ledsX = 190

ledsY = 70
GUI LED led_run, "Running", ledsX, ledsY, 12, RGB(green)

ledsY = ledsY + 40
GUI LED led_alarm, "Alarm", ledsX, ledsY, 12, RGB(red)

CtrlVal(led_run) = 1

' =========================
' Logging frame
' =========================
Colour RGB(cyan), 0

GUI Frame frm_log, "Log File", 370, 15, 255, 275, RGB(green)

GUI Checkbox cb_enabled, "Logging Enabled", 385, 40, 25, RGB(cyan)

GUI Caption c_fname, "File Name", 385, 80

GUI Textbox tb_fname, 385, 105, 220, 32, RGB(cyan), RGB(64,64,64)

GUI Caption c_log, "Record:", 385, 160, , RGB(cyan), 0

GUI Checkbox cb_flow, "Flow Rate", 405, 190, 20
GUI Checkbox cb_alarm, "Alarms", 405, 220, 20
GUI Checkbox cb_warn, "Warnings", 405, 250, 20

CtrlVal(cb_enabled) = 1
CtrlVal(tb_fname) = "LOGFILE.TXT"

' =========================
' Backlight control
' =========================
GUI Caption c_bright, "Backlight", 360, 375, , RGB(200,200,255), 0

GUI Spinbox sb_bright, 450, 365, 150, 40, , , 10, 10, 100

CtrlVal(sb_bright) = 50

' =========================
' Main loop
' =========================
Do
Loop

' =========================
' Touch down interrupt
' =========================
Sub TouchDown
   Local Integer mbox

   Select Case Click(REF)

       Case cb_enabled
           If CtrlVal(cb_enabled) Then
               GUI Restore c_fname, tb_fname, c_log, cb_flow, cb_alarm, cb_warn
           Else
               mbox = MsgBox("Are you sure?", "YES", "CANCEL")

               If mbox = 1 Then
                   GUI Disable c_fname, tb_fname, c_log, cb_flow, cb_alarm, cb_warn
               Else
                   CtrlVal(cb_enabled) = 1
               EndIf
           EndIf

       Case sb_bright
           ' BackLight CtrlVal(sb_bright)

       Case sw_pmp
           CtrlVal(led_run) = CtrlVal(sw_pmp)
           CtrlVal(tb_flow) = Str$(CtrlVal(sw_pmp) * 20.1)
           CtrlVal(r_norm) = 1

       Case pb_test
           CtrlVal(led_alarm) = 1

       Case r_econ
           CtrlVal(tb_flow) = Str$(CtrlVal(sw_pmp) * 18.3)

       Case r_norm
           CtrlVal(tb_flow) = Str$(CtrlVal(sw_pmp) * 20.1)

       Case r_hi
           CtrlVal(tb_flow) = Str$(CtrlVal(sw_pmp) * 23.7)

   End Select
End Sub

' =========================
' Touch up interrupt
' =========================
Sub TouchUp
   Select Case Click(LASTREF)

       Case pb_test
           CtrlVal(led_alarm) = 0

   End Select
End Sub

' =========================
' Mouse cursor handler
' =========================
Function MM.CURSOR(t As Integer) As Integer
   Static Float lasttime

   If Timer > lasttime + 20 Or Timer < lasttime Then
       x = Mouse(x,1)
       y = Mouse(y,1)
       lb = Mouse(l,1)

       lasttime = Timer

       GUI Cursor x, y
   EndIf

   MM.CURSOR = -1

   If t = 1 Then
       MM.CURSOR = lb
   ElseIf t = 2 Then
       If lb Then MM.CURSOR = x
   ElseIf t = 3 Then
       If lb Then MM.CURSOR = y
   ElseIf t = 4 Then
       MM.CURSOR = lb
   Else
       MM.CURSOR = lb
   EndIf
End Function

' =========================
' Beeper
' =========================
Sub MM.Beep beeptime As Integer
   If beeptime And MM.Info(Sound) = "OFF" Then
       Play Tone 600, 600, beeptime
   EndIf
End Sub
 
     Page 10 of 10    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026