|
Forum Index : Microcontroller and PC projects : PicoMite MMbasic V7.00.00 betas:
| Author | Message | ||||
| hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 231 |
i wanted to explain that "do" and "loop" could not be between 2x : or in 1 line without : |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 9163 |
It's the joy of the almost invisible colon, isn't it? :) 'wait forever do:loop Mick Zilog Inside! nascom.info for Nascom & Gemini |
||||
| barewires Newbie Joined: 13/04/2015 Location: United KingdomPosts: 36 |
web ntp 1 ntp address 185.57.191.230 got ntp response: 01/10/2026 15:06:36 Saved 1957 bytes Print "PICO2W 10 RPOM free gift" 7.000002 WebMite RP2350A 10-01-2026 15:06:12 The £ sign does not work. |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11925 |
Of course not, it isn't an ascii character. Create one to match the font you are using and use gui bitmap to output it |
||||
| terekgabor Senior Member Joined: 02/01/2026 Location: HungaryPosts: 140 |
Hello Peter! New version V7.0.00b2 is working very well for me! I have tested a small modification to WebMite version (tried with a Pimoroni Pico Plus 2 W [RP2350]), which makes the onboard CYW43 LED accessible from MMBasic when the heartbeat is disabled. I made a new command LED: The new commands are: LED ON LED OFF The implementation uses: cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, state); so it controls the same CYW43 LED that the code already uses for the heartbeat. To prevent conflicts with the heartbeat, the LED command checks: if (!Option.NoHeartbeat) error("Heartbeat is enabled"); The existing WebHeartbeat() code I didn’t modify. The changes are: Commands.h Add the LED command to the WebMite command table: #ifdef PICOMITEWEB { "LED", T_CMD, 0, cmd_led }, #endif and declare: #ifdef PICOMITEWEB void cmd_led(void); #endif net/WiFi.c Added: void cmd_led(void) { char *p; if (!Option.NoHeartbeat) error("Heartbeat is enabled"); p = checkstring(cmdline, "ON"); if (p) { cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1); return; } p = checkstring(cmdline, "OFF"); if (p) { cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 0); return; } error("Syntax"); } I tested it on my PicoCalc with Webmite fw, working good. I don’t know if I did 100% the right way, but works. Maybe you can implement this or similar command to the next versions, if somebody wants to switch this LED like a normal output (of course not GP) as we can do with the non-web versions. G@bor |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 6148 |
Peter, Thank you for 5 kbyte more heap in 7.00.00b3 in the 2040MIN version. Testing goes well so far. With b3 (up to now) all programs run. Volhout PicomiteVGA PETSCII ROBOTS |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 11925 |
V7.00.00b3 is now available at https://github.com/UKTailwind/PicoMite/releases/tag/PicoMite-V7.0.00b3 This is another huge internal change. Since the implementation of hashed variable lookup a big chunk of ram has been allocated to variables that may or may not be needed. V70.00.00b3 completely re-engineers that so that the has table is just a table of pointers and that storage for the actual variables is only used when needed What has changed. Until now MMBasic set aside a fixed block of memory for variables when the board started: room for every variable a program could ever have, whether it used five or five hundred. That block was 27 KB on the RP2040 builds and up to 49 KB on the RP2350, and nothing else could use it. In beta 3 a variable takes its memory from the same pool as strings and arrays (the heap), and only when the program creates it. The memory comes in small groups of 32 variables, and the block that used to be reserved has been added to the heap. What you gain. More memory on every board. The heap is 20 to 24 KB larger on the RP2040 builds and 40 to 56 KB larger on the RP2350: for example 120 KB instead of 100 KB on the RP2040 PicoMiteVGA, and 344 KB instead of 300 KB on the RP2350 PicoMite. That is room for bigger arrays, more strings, sound buffers and framebuffers. Memory and flash layout lists every build. A program pays only for the variables it has. A program with 40 variables uses memory for about 40, not for 500 empty places. MEMORY shows the variables' share as it grows. Faster programs that were short of memory. V7 is quicker because it remembers where every name's variable is (symbols), and those tables need memory. In beta 2 a program that was already short of memory had to switch them off with OPTION SYMBOLS OFF. Now most such programs have room for them. The logic analyser that prompted OPTION SYMBOLS OFF now runs with its symbols on an RP2040 PicoMiteVGA, and its main loop takes 81 ms instead of 110 ms: more than a third faster. Nothing to change in your programs. The number of variables you can have is the same as before, OPTION LOCAL VARIABLES works as it did, and local variables only use memory while a SUB or FUNCTION is running them. The PicoMiteHDMIWEB also takes programs of up to 152 KB instead of 144 KB. |
||||
| toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 725 |
I have a PicoCalc with a Pimoroni Pico 2. My library stored is on B: It worked fine in beta 2. When I load it into beta 3 and try to use LIBRARY SAVE, I get Error: Not enough memory for 348224 bytes Footnote added 2026-10-02 09:41 by toml_12953 I turned on PSRAM and it worked OK. For the record this is my library: OPTION console none ON ERROR SKIP 2 CONST TRUE = -1 CONST FALSE = 0 SETPIN GP4,GP5,COM2 OPTION console screen SUB MM.STARTUP OPTION console none DRIVE "B:" OPTION console screen END SUB SUB MM.END PRINT "END PROGRAM" OPTION console screen END SUB SUB mm.prompt SETPIN GP4,GP5,COM2 PRINT ">"; END SUB SUB LLIST(fname$) FONT 8 OPTION console serial IF fname$="" THEN LIST all ELSE LIST all fname$ END IF PRINT :PRINT :PRINT :PRINT :PRINT PRINT :PRINT OPTION console screen FONT 1 END SUB SUB BEEP() PLAY tone 1000,1000:PAUSE 175 PLAY stop END SUB FUNCTION DET(n()) DET=MATH(m_determinant n()) END FUNCTION FUNCTION INVR(n()) AS float(BOUND(n(),1),BOUND(n(),2)) MATH m_inverse n(),INVR() END FUNCTION FUNCTION TRN(n()) AS float(BOUND(n(),1),BOUND(n(),2)) MATH m_transpose n(),TRN() END FUNCTION FUNCTION CON(n()) AS float(BOUND(n(),1),BOUND(n(),2)) MATH SET 1,CON() END FUNCTION FUNCTION ZER(n()) AS float(BOUND(n(),1),BOUND(n(),2)) MATH SET 0,ZER() END FUNCTION FUNCTION CPY(n()) AS float(BOUND(n(),1),BOUND(n(),2)) MATH scale n(),1,CPY() END FUNCTION SUB MAT_PRINT(n()) AS float(BOUND(n(),1),BOUND(n(),2)) MATH m_print n() END SUB SUB MAT_READ(n()) AS float(BOUND(n(),1),BOUND(n(),2)) LOCAL col,row FOR col=BOUND(n(),0) TO BOUND(n(),2) FOR row=BOUND(n(),0) TO BOUND(n(),1) READ n(row,col) NEXT row NEXT col END SUB FUNCTION IDN(n()) AS float(BOUND(n(),1),BOUND(n(),2)) LOCAL col,row LOCAL temp(BOUND(n(),1),BOUND(n(),2)) FOR col=BOUND(n(),0) TO BOUND(n(),1) FOR row=BOUND(n(),0) TO BOUND(n(),2) IF row=col THEN temp(col,row)=1 ELSE temp(row,col)=0 END IF NEXT row NEXT col IDN()=temp() END FUNCTION |
||||
| JanVolk Guru Joined: 28/01/2023 Location: NetherlandsPosts: 412 |
I can no longer save my `help.txt` file after transferring it using MM Edit 4. (It used to work fine before.) Placing a `'` before `TYPE` in the error message doesn't help; doing the same for `SUB`, or placing a `'` after... > save "help.txt PC=> > PicoMite MMBasic RP2040 V7.0.00b2 Copyright 2011-2026 Geoff Graham Copyright 2016-2026 Peter Mather [1445] ~UPDATE Error: Invalid member definition in TYPE > memory Program: 72K (59%) Program (2052 lines) 48K (41%) Free Saved Variables: 16K (100%) Free RAM: 0K ( 0%) 0 Variables 37K (23%) General 118K (77%) Free > save "help.txt PC=[1445] ~UPDATE Error: Invalid member definition in TYPE > option list PicoMite MMBasic RP2040 V7.0.00b2 OPTION SYSTEM SPI GP2,GP3,GP0 OPTION SYSTEM I2C GP12,GP13 OPTION FLASH SIZE 4194304 OPTION COLOURCODE ON OPTION HEARTBEAT OFF OPTION PICO OFF OPTION CPUSPEED (KHz) 200000 OPTION DISPLAY 50, 100 OPTION LCDPANEL ST7789_135, RLANDSCAPE,GP1,GP22,GP5,GP4 OPTION SDCARD GP17, GP18, GP19, GP20 OPTION F1 help OPTION F6 list commands OPTION F7 list functions OPTION F8 list pins OPTION F9 fm OPTION PLATFORM LILYGO T-PicoC3 1.14" 240x135 Jan. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |