Это видео недоступно.
Сожалеем об этом.
Program the Raspberry Pi Pico using BASIC - Introducing PiccoloBASIC
HTML-код
- Опубликовано: 17 авг 2024
- There is now an new way to code for the Raspberry Pi Pico, using BASIC. While you can code for the Pico using C/C++ or Micropython, now you have the option to use BASIC. This is a video about how I ported my BASIC interpreter to the Pico.
---
Let Me Explain T-shirt: teespring.com/...
Twitter: / garyexplains
Instagram: / garyexplains
#garyexplains
This is so interesting. I haven't used BASIC since the 80s. First Applesoft BASIC on the Apple ][+ then BBX (Business Basic eXtended) for work.
Wonderful work, Gary! Thanks for this.
I am glad you like it. 👍
I was using BASIC as recently as last month. Coding in MS Access is in BASIC. I was also doing Active Server Pages in Microsoft's web server in 2000 which uses BASIC as well. Modern BASICs don't use line numbers but instead labels and procedures but GOTO still exists.
For small jobs BASIC is perfect. If the project grows very large you may question your choice of BASIC.
@@wayland7150Well, that's just one particular implementation of BASIC, and perhaps not the best example. Microsoft have always had their own versions of BASIC, that's how they got started in the first place, but they weren't necessarily great examples. There are many other versions out there, some of which are only suitable for small projects that don't require much speed, but some are ideal for big projects or are optimised for speed.
I really like these projects. It’s great to watch people taking technology and making it their own. Thanks for your enthusiasm Gary.
Ha! A man after my heart! During some covid lockdown a couple of years ago I put together an ESP32 based hand console (I have a bunch of parts including a Pi Pico but thought I'd muck around with ESP32) with a colour LCD display with the idea - having grown up with computers in the 80's - of a device like my C64 with instant on into a programming environment for kids. I looked long and hard at BASIC but decided I didn't really like it in 2020+ and ported Lua, a graphics library and wrote my own sound library. OS functions and file system almost like yours. Then lockdown ended and got an interesting job and lost interest in it...
Well done Gary... you did it!
Great work, it makes me very interested in the future of this project.
Nice! Ordered a Pico just to play wit this.
Wow. Cool. Have fun!
Me too!
I just change the OS on my only pico. I am a beginner and dont want to invest much money until i have at least some learning results. I was struggling if i should learn micropython or circiutpython. I tend to the last, because it has more supporter and more libs or whatever. Now i will try basic.
Very cool retro effort! Thanks for sharing this content!
Glad you enjoyed it!
As a guy starting on the Apple II and TRS 80 I say THANK YOU ! ! !
Wow, such a cool project. I can't wait to see where this goes.
You and me both!
Interesting project Gary -- and well done. However, MM Basic running on the Pico (in it's various guises - PicoMite, PicoMiteVGA & WebMite) is just such a well developed system now that I can't see any reason I'd want to use any other BASIC (and to be honest I don't want to dabble in Python either really) I also noticed that you commented elsewhere that MMB isn't open source. Technically that is so but in practice you can request the source from Geoff and he'll let you have it. Quite a few people have done so and it's one of the reasons MMB has prospered and is now supported on multiiple hardware platforms. For instance Peter M is the main 'Pico' developer but others are supporting MMB on Linux and the (very fast) STM H7. It is of course free to donwload and I have MMB running on PIC32, Pico/PicoVGA and Win11 these days...
very interesting. I did learn basic in the 80ies, when i was a teen.
I need to see the Sieve of Eratosthenes times, like Byte Magazine used to do back when Basic was the thing!
If you have a Pico then please give it a try and post the results, it would be interesting to see!
As always I learned something from your video. Going to check out the little FS. I should put the HOC calculator from Kernigan and Pike book on my Pico 😁
Fantastic. Another reason for me to buy a Pico.
Go for it!
I’m excited. More than I have been in a long time for a basic focused project. Is this open source? I’d love to add some functions to the basic language hat I have always thought were missing from basic when I was using the Apple ][e as a kid. Simple support for regular expressions, etc. would be friggin awesome to have built in. Never mind…..just heard it’s ooensource. Now even more excited. So excited I’m jumping the gun on listening vs typing.
Cool, sounds much like MMBASIC for the Raspberry Pico!
Or PicoBB
MMBASIC is a far more structured version.
I'm not sure why the comments were deleted regarding Pico BBC BASIC?
BBC BASIC on the Pico would be cool. Does that exist?
This is a basically great video.
PS, stupid word puns are my GOTO humour.
Hi Gary I've been trying get my pi pico to work with my pca9685 16 channel servo board if you know good video how up load the modules code in the correct folder . I've tried micopython and circuitpython my code not run I've tried all ide programs thonny circuitpython ect. I 'm lost anyone help please. I've built a magicmirror2 cars moving with will remote. I can get the servos using gpio pins but would get board working. Help please
alll Basic stuff is cool. its a bit like mm-basic. hope full you got cool options soon!
I hope that PiccoloBASIC will become as advanced as MMBASIC. Plus there is the advantage that PiccoloBASIC is open source, whereas MMBASIC isn't.
@@GaryExplains Yeah that is really great stuff! cant wait! i love coding in basic. still doing that on my msx from 1984
@@GaryExplainsCatching up with the PicoMite is a very tall order indeed. Picomite, ArmMiteF4 and ArmMiteH7 are now open source.
Got to try this, great stuff :)
Have fun!
Sir, I love Basic days and I’m finding my way for Python programming. I wish I can assist in anyway you see fits
Pretty cool, Gary. If you do try to implement keyboard support, I’d think PS/2 would be easier. Could also add SD card support so that external storage is possible. 👍
I dont think PS/2 support would be useful. In the future will be no PS/2 be available. Either USB or a terminal.
@@suki4410 Some keyboards talk USB and PS/2. A passive plug changes USB to PS/2. PS/2 suits the Pico better. You could get an active converter if not. Most motherboards still have a PS/2 connector.
Picomite Also supports Color VGA
There is little point in providing PS/2 these days. Modern keyboards often don't speak that protocol, meaning buying a specific keyboard just for it's compatibility, finding an old keyboard that supports it, or buying an active adapter. Most consumer motherboards don't come with PS/2 sockets. USB is a universal protocol, and allows many other devices to be attached, not just keyboards. Oh, and try daisy chaining PS/2 devices, assuming you can find anything other than keyboards. 😁
USB is not too hard on pico. Quite the opposite.
Dear Gary please bring android comparisons for qualcomm soc's
compare android 10_14
I want to understand how really & what they improved
I doubt there got any improvement
Очень интересно, выглядит так просто. Спасибо.
Would it be possible to put the VGA or DVI "sock" projects on the other core? That would give native video access through VGA or HDMI.
Yes, absolutely.
@@GaryExplains Great project, Gary. Continued Success!
I dont expect much, because maybe there will be a better pico in the future with more ram and VGA on board. A terminal or a text display will do the job until then. Time will tell.
@@suki4410 There are already other projects running BASIC and C with VGA output using Pico. Look up the RP6502 project for one. What I'd like to see is a PI type Pico with VGA output. The work has already been done apart from laying out a PCB. PCB Way cold easily pop the 2040 chip on the board and we could solder on the rest.
Seems like a great idea!
I'm sorry if this is out of topic, Gary. But can you please do another smartphone speed test? Mediatek nowadays is beating Snapdragon in the mid range class. The difference is so thin but we don't have any solid benchmark to compare it except your speed test.
I had to retire Speed Test G, there wasn't enough interest. Sorry.
Piccolo basic. Can it be used just like Picomite basic( Geoff projects) -video from explaining computers. Thanks Tom
I made a whole video about how it can be used. Was there something I didn't cover?
Other things it really, really needs:
1) Arrays. I'm not sure how you can do anything at all useful with it, without being able to make lists of things.
2) String operators, like length, substring. Once you have arrays set up, then you can access individual characters in a string by making a string an array of characters. Yeah, I know that takes a lot.
3) Exec n, as in, "execute machine code starting at address n".
4) File read and write (and of course, open and close).
It's amazing what these features make possible. Because a version of BASIC I was using allowed array variables, and treated strings as arrays of characters, I could emulate structs that held a LOT of data. In another BASIC, I was able to write an assembler in BASIC (I think it was for Z-80), which combined with peek and poke and exec and file reads and writes, allowed me to write optimized routines for speed critical portions of programs.
These are just suggestions, based on what features in BASIC have been most useful to me. I left BASIC decades ago, so I won't be helping with this. But good luck, and happy programming!
BASIC doesn't NEED a way to execute machine code from within. It might be useful to some people, but if people want that level of complexity, they are unlikely to be using a version of BASIC like this in the first place. There are plenty of other options. Arrays and file I/O are pretty much a necessity for any language.
@@another3997 I disagree. At some point, you either learn how to get past BASIC's limits, or you get bored and put it in the box with your other outgrown toys.
@@another3997 Pretty much all of the early 80s BASICs had ways of giving you the keys to your computer, but without direct memory and I/O access and an 'execute' instruction, this is just a sandbox.
have you looked at either MMBasic or PicoBB, asfull'ish Microsoft and BBC BASIC ports to the Pico?
Like I said, I left BASIC a long time ago. I'm looking for a C compiler that can be run natively so I can have a development environment that isn't tethered to a PC. My comment was based on what would be the deal breakers for me if I wanted to do BASIC in a handheld device.
this is so cool!
How about "if" "else", unless you included them.
--
Also, why don't you just give us the .uf2 file with a link to it so those of use that don't compile, will have it ready for upload- and include a link to it for us?
IF ELSE is also included. See the 99 soda bottles demo.
Yes, good idea. I will upload the .uf2 file 👍
Thanks!
If you really want to impress me, write a BASIC compiler.
I am not trying to impress you 😜
@@GaryExplains Very well done
Gary, I sent you an email that you may find interesting. It is about the unusual features provided in a language interpreter from the distant past. The language was called BMIL.
I disagree with need for peek and poke. Those were used to make basic get around its limitations as a basic interpreted language giving very minimal access to memory directly for running very small machine language programs, storing direct bytes of data, or doing things like beeping a speaker. All things that should not be necessary in a modern version of BASIC. Simply put, they were crutches for basic to access the hardware layer underneath for the most part. Having in language support for BEEP instead of poke 245,1 is way more user friendly. Having the method for turning the gpio pins on and off and setting direction gives way more functionality and developer friendliness in your current method, than anything having to do with peeking and poking some memory address to do the same thing. I remember using an old commodore pet with an expanded instruction set chip on board and to get it to activate you had to poke about 3 memory holes and then flip a toggle. It worked for its use because it was a very customized machine back in 1980-82, and no one else would have that setup.i simply do not see a need for peek and poke if you can use more elegant and friendly in language commands.
I fondly remember playing with interesting features of the various custom chips on my Atari 8 bit machines using PEEK and POKE rrom BASIC. Having BASIC commands for each feature would have increased the ROM size dramatically, and made the language cumbersome. Once you start adding lots of extra commands, you lose the simplicity of BASIC, and you need to refer to reference manuals more often to find the right command and the order of parameters etc. Which begs the question... how is that any better than learning to PEEK and POKE a few memory addresses?
It will be great to have a basic compiler, like the PICBASIC PRO compiler or PROTON basic for the pic microcontrollers.I had to learn C to use modern microcontrollers, but it's so easy with basic. if the basic is interpreted, the performances collapse as for the python.
This isn't as bad an idea as it might at first seem. There is SO MUCH about C that makes it a challenge to write a compiler for, it could be that BASIC would be a great "first compiler", since the language itself is so simple. The main issue is that you would probably have to add a dimension statement in order to declare arrays, and require dimensioning all variables, including simple integer variables. Otherwise, compiled BASIC would have to do a lot of work to automatically allocate memory for variables.
@@BrightBlueJimBASIC doesn't have enough to have a DIM statement in order to be compiled, it's down to whoever writes the language. These days, most versions of BASIC are either designed to be compiled from day one, or are strictly interpretive, so the problem would be sorted in the initial design stages.
@@another3997 yeah, but no that I think about it, the worst limitation is not having any way to define any kind of objects, or any other structure beyond strings and simple numbers.
👍👍!
Does anyone make this kind of basic for a Pi4?
It wouldn't be hard to get it running on a Pi0/1/2/3/4.
All ARM and no Risc-V makes MarquisDeSang a dull boy.
All ARM and no Risc-V makes MarquisDeSang a dull boy.
All ARM and no Risc-V makes MarquisDeSang a dull boy.
All ARM and no Risc-V makes MarquisDeSang a dull boy.
Can you please make it more limmericky?
What is wrong with the comments?
Eh?
@@GaryExplains I only saw troll comments about child labor and "your mom"
Let's see if I remember.
10 print "your mom"
20 goto 10