Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:30 13 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 3 of 6    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11313
Posted: 06:53pm 06 May 2026
Copy link to clipboard 
Print this post

Like this?
 
JanVolk
Guru

Joined: 28/01/2023
Location: Netherlands
Posts: 349
Posted: 06:55pm 06 May 2026
Copy link to clipboard 
Print this post

Test PicoMite MMBasic RP2040 V6.03.00RC2 with F12. Note line 5.


> list
' Traffic light.
SetPin GP13, DOUT      ' YELLOW via 470 ohm resistor to GND.
SetPin GP14, DOUT      ' RED    via 470 ohm resistor to GND.
SetPin GP15, DOUT      ' GREEN  via 470 ohm resistor to GND.
                       ' On the LED ( = Anode(+) and | = Cathode(-).
Const ON  = 1          ' 1 = ON  or 3V3 / 3.3V on pin.
Const OFF = 0          ' 0 = OFF or 0V  / GND  on pin.


Do
 Pin(GP14)   = ON     ' RED
 Pin(GP13)   = OFF    ' YELLOW
 Pin(GP15)   = OFF    ' GREEN
 Pause 10000          ' Wait 10 seconds.
 Pin(GP14)   = OFF    ' RED
 Pin(GP13)   = OFF    ' YELLOW
 Pin(GP15)   = ON     ' GREEN
 Pause 10000          ' Wait 10 seconds.
 For A = 1 To 5       ' Flash loop 5x 0.5 seconds.
   Pin(GP14) = OFF    ' RED
   Pin(GP13) = ON     ' YELLOW
   Pin(GP15) = OFF    ' GREEN
   Pause 500          ' Wait 0.5 seconds.
   Pin(GP14) = OFF    ' RED
   Pin(GP13) = OFF    ' YELLOW
   Pin(GP15) = OFF    ' GREEN
   Pause 500          ' Wait 0.5 seconds.
 Next A
Loop
>
> edit

F12 and Y

> list
' Traffic light.
SetPin GP13, DOUT      ' YELLOW via 470 ohm resistor to GND.
SetPin GP14, DOUT      ' RED    via 470 ohm resistor to GND.
SetPin GP15, DOUT      ' GREEN  via 470 ohm resistor to GND.
' On the LED ( = Anode(+) and | = Cathode(-).
Const ON  = 1          ' 1 = ON  or 3V3 / 3.3V on pin.
Const OFF = 0          ' 0 = OFF or 0V  / GND  on pin.

Do
 Pin(GP14)   = ON     ' RED
 Pin(GP13)   = OFF    ' YELLOW
 Pin(GP15)   = OFF    ' GREEN
 Pause 10000          ' Wait 10 seconds.
 Pin(GP14)   = OFF    ' RED
 Pin(GP13)   = OFF    ' YELLOW
 Pin(GP15)   = ON     ' GREEN
 Pause 10000          ' Wait 10 seconds.
 For A = 1 To 5       ' Flash loop 5x 0.5 seconds.
   Pin(GP14) = OFF    ' RED
   Pin(GP13) = ON     ' YELLOW
   Pin(GP15) = OFF    ' GREEN
   Pause 500          ' Wait 0.5 seconds.
   Pin(GP14) = OFF    ' RED
   Pin(GP13) = OFF    ' YELLOW
   Pin(GP15) = OFF    ' GREEN
   Pause 500          ' Wait 0.5 seconds.
 Next A
Loop


Jan.
Edited 2026-05-07 04:56 by JanVolk
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 618
Posted: 07:14pm 06 May 2026
Copy link to clipboard 
Print this post

  matherp said  Still works for me


OK, which of these two is the case?

In the filename "01.MyBASICProg.bas"

A. The filename is 01 and the extension is MyBASICProg.bas

B. The filename is 01.MyBASICProg and the extension is .bas


In MS-DOS and Windows, B is the answer.

Asking for a friend...
Edited 2026-05-07 05:15 by toml_12953
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 580
Posted: 08:06pm 06 May 2026
Copy link to clipboard 
Print this post

  javavi said  @matherp Peter,
Since things are moving forward, can I ask too?
Is it possible to make a built-in calculator for PicoMite, using the CALC command?

A calculator like the one in PicoTop
https://github.com/7west/PicoTop


Please don't ;-) Why else do we have BASIC for writing our own programmes? ;-)
@javavi: This command is very interesting for that:



Matthias
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4316
Posted: 08:49pm 06 May 2026
Copy link to clipboard 
Print this post

For calculations, at the prompt I just use

? expression

John
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11313
Posted: 09:47pm 06 May 2026
Copy link to clipboard 
Print this post

  Quote   Test PicoMite MMBasic RP2040 V6.03.00RC2 with F12. Note line 5.


That is what it does. Don't like it, don't use it. There is no right answer.

  Quote  OK, which of these two is the case?

The first . character in the filename is treated as the start of the extension. If there is already an extension defined then .bas isn't added. This won't be changing

  Quote  For calculations, at the prompt I just use
? expression


That doesn't deal with carrying forward the answer as in Javavi's example and my response
Edited 2026-05-07 07:50 by matherp
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3191
Posted: 10:21pm 06 May 2026
Copy link to clipboard 
Print this post

For years I have been using:-
> x=5*2 :?x
10
> ?x+10
20
> ' or
> x=x+10 :?x
20
>

It is a bit more typing, though in TeraTerm the " :?x" can be held on the clipboard (highlight with mouse) and applied at the end of every line with Alt-V
Edited 2026-05-07 08:22 by phil99

Footnote added 2026-05-07 08:41 by phil99
And JohnS has reminded me (see below) the up arrow can save some typing on PicoMites.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4316
Posted: 10:22pm 06 May 2026
Copy link to clipboard 
Print this post

  matherp said  
  Quote  For calculations, at the prompt I just use
? expression


That doesn't deal with carrying forward the answer as in Javavi's example and my response

Then I'd use

x = expression

I probably do it a few times a month at most so I don't need any more of an embedded calculator but maybe others have a need?

If I'm using MMB4L I don't even need to use the above as you can hit uparrow (as many times as you like) and reuse the existing expression(s).

John
Edited 2026-05-07 08:24 by JohnS
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 618
Posted: 04:07am 07 May 2026
Copy link to clipboard 
Print this post

Is there any way to get lines longer than 40 characters LISTed on a PicoCalc? I have a  serial printer hooked up and can LIST a program to the serial port but it still wraps at 40 columns even though the printer is an 80-column printer.
 
homa

Guru

Joined: 05/11/2021
Location: Germany
Posts: 580
Posted: 05:45am 07 May 2026
Copy link to clipboard 
Print this post

JohnS, javavi,

It was meant to be a hint about the possibility of programming a miniCalc yourself    
I had the command to hand because I’d been thinking about a ‘programmer’s pocket calculator’ over the last few days.

I just don’t think something like that belongs in the firmware anymore!

Just my two cents.

Matthias

Mini example, without error handling, without parsing the input, etc.:

CLS
Font 1
Dim integer r%
Dim string  i$
Do
 Input "Calc ";i$
 r%=Eval(i$)
 Print r%, Hex$(r%), Bin$(r%,16)
Loop



Calc ? 2+3*4
14     E       0000000000001110
Calc ? sin(pi/2)
1      1       0000000000000001
Calc ?
 
terekgabor
Regular Member

Joined: 02/01/2026
Location: Hungary
Posts: 73
Posted: 05:49am 07 May 2026
Copy link to clipboard 
Print this post

I recommend and use the same.
This is Eval.
I use also On error skip with it, then I can handle alarms without stopping the program (for example syntax, divude by zero, etc.)

G@bor
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1089
Posted: 07:17am 07 May 2026
Copy link to clipboard 
Print this post

...I'm not sure if this has been mentioned before: When you try to open files in the Text Viewer that are smaller than or equal to one page, the Text Viewer closes immediately and you can't view them.
Would it be possible to make it so that the viewer closes only when you press ESC?

Frank

(P.S.: Tested with PicoCalc and PicoMiteRP2350V6.03.00RC2)
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11313
Posted: 07:33am 07 May 2026
Copy link to clipboard 
Print this post

Frank, will fix. Please could you look at my post on the Question about astro thread
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 1089
Posted: 07:48am 07 May 2026
Copy link to clipboard 
Print this post

Peter,

I'd really like to check that out tonight.

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11313
Posted: 08:53am 07 May 2026
Copy link to clipboard 
Print this post

V6.03.00RC3

PicoMiteRP2040V6.03.00RC3.zip

PicoMiteRP2350V6.03.00RC3.zip

Listing a short file in FM now requires a keypress before exiting the listing to avoid it disappearing immediately

Expermental add-ons

All versions:
Calculator immediate mode at the command prompt. Type in calculations and you will get the answer no need for a question mark. The answer will also be stored in a variable MM.ANSWER allowing follow-up calculations. This code is 1: trivial and 2: only gets executed after all normal command line processing has failed, so it should be benign and I will certainly find it useful as well as hopefully javavi

RP2350 versions:
SLEW command
GPS_Astro_Reference.pdf
Edited 2026-05-07 18:53 by matherp
 
terekgabor
Regular Member

Joined: 02/01/2026
Location: Hungary
Posts: 73
Posted: 10:21am 07 May 2026
Copy link to clipboard 
Print this post

Peter!

Fantastic again, thank you!
What do you think can somehow solve to use string variable to give object name for Astro and Star command?

G@bor
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11313
Posted: 11:42am 07 May 2026
Copy link to clipboard 
Print this post

  Quote  What do you think can somehow solve to use string variable to give object name for Astro and Star command?

Will do
 
terekgabor
Regular Member

Joined: 02/01/2026
Location: Hungary
Posts: 73
Posted: 11:50am 07 May 2026
Copy link to clipboard 
Print this post

Thanks a lot!
G@bor
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 471
Posted: 12:12pm 07 May 2026
Copy link to clipboard 
Print this post

Peter,

occasionally I get an error in the new calculator mode, e.g.

> sqr(2)
Error : MM.ANSWER is not declared

can dim mm.answer as integer, calc-mode works then and it turn up as a float variable which makes sense.

Currently I'm not able to reproduce it consistently.

Env.:
PicoMite MMBasic RP2350B V6.03.00RC3
Edited 2026-05-07 22:13 by ville56
                                                                 
73 de OE1HGA, Gerald
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11313
Posted: 12:50pm 07 May 2026
Copy link to clipboard 
Print this post

Caused by OPTION EXPLICIT - easy fix for next RC
 
     Page 3 of 6    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026