Program the Raspberry Pi Pico using BASIC - Introducing PiccoloBASIC

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 มิ.ย. 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/gary-explains-l...
    Twitter: / garyexplains
    Instagram: / garyexplains
    #garyexplains
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 90

  • @slothgirl2022
    @slothgirl2022 11 หลายเดือนก่อน +9

    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.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน

      I am glad you like it. 👍

    • @wayland7150
      @wayland7150 11 หลายเดือนก่อน

      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.

    • @another3997
      @another3997 5 หลายเดือนก่อน

      ​@@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.

  • @stompreaper
    @stompreaper 11 หลายเดือนก่อน +3

    I really like these projects. It’s great to watch people taking technology and making it their own. Thanks for your enthusiasm Gary.

  • @teikoh5690
    @teikoh5690 11 หลายเดือนก่อน +1

    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...

  • @stevedegeorge726
    @stevedegeorge726 11 หลายเดือนก่อน +4

    Nice! Ordered a Pico just to play wit this.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +2

      Wow. Cool. Have fun!

    • @rsc9520
      @rsc9520 11 หลายเดือนก่อน

      Me too!

    • @suki4410
      @suki4410 11 หลายเดือนก่อน

      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.

  • @notbugs
    @notbugs 11 หลายเดือนก่อน +2

    Great work, it makes me very interested in the future of this project.

  • @MellexLabs
    @MellexLabs 11 หลายเดือนก่อน +3

    Well done Gary... you did it!

  • @mechaform
    @mechaform 11 หลายเดือนก่อน +2

    Very cool retro effort! Thanks for sharing this content!

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +1

      Glad you enjoyed it!

  • @ksbs2036
    @ksbs2036 11 หลายเดือนก่อน

    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 😁

  • @webmasterg3526
    @webmasterg3526 4 หลายเดือนก่อน

    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...

  • @RetroGameCoders
    @RetroGameCoders 11 หลายเดือนก่อน +1

    Got to try this, great stuff :)

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +1

      Have fun!

  • @Tugedhel
    @Tugedhel 11 หลายเดือนก่อน

    As a guy starting on the Apple II and TRS 80 I say THANK YOU ! ! !

  • @suki4410
    @suki4410 11 หลายเดือนก่อน +1

    very interesting. I did learn basic in the 80ies, when i was a teen.

  • @RPrice_OG
    @RPrice_OG 11 หลายเดือนก่อน +1

    Wow, such a cool project. I can't wait to see where this goes.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน

      You and me both!

  • @wisteela
    @wisteela 11 หลายเดือนก่อน +2

    Fantastic. Another reason for me to buy a Pico.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +1

      Go for it!

  • @Aeon_Electronics
    @Aeon_Electronics 7 หลายเดือนก่อน +1

    Cool, sounds much like MMBASIC for the Raspberry Pico!

  • @PeterRichardsandYoureNot
    @PeterRichardsandYoureNot 5 หลายเดือนก่อน

    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.

  • @JWNZ
    @JWNZ 11 หลายเดือนก่อน

    Seems like a great idea!

  • @Technonux
    @Technonux 11 หลายเดือนก่อน +1

    this is so cool!

  • @localixdots9698
    @localixdots9698 10 หลายเดือนก่อน

    Очень интересно, выглядит так просто. Спасибо.

  • @esra_erimez
    @esra_erimez 11 หลายเดือนก่อน +2

    This is a basically great video.

    • @wayland7150
      @wayland7150 11 หลายเดือนก่อน

      PS, stupid word puns are my GOTO humour.

  • @thaernejem7317
    @thaernejem7317 11 หลายเดือนก่อน +1

    Sir, I love Basic days and I’m finding my way for Python programming. I wish I can assist in anyway you see fits

  • @robertdelfavero6552
    @robertdelfavero6552 9 หลายเดือนก่อน

    I need to see the Sieve of Eratosthenes times, like Byte Magazine used to do back when Basic was the thing!

    • @GaryExplains
      @GaryExplains  9 หลายเดือนก่อน

      If you have a Pico then please give it a try and post the results, it would be interesting to see!

  • @ZettDarkstone
    @ZettDarkstone 11 หลายเดือนก่อน +2

    alll Basic stuff is cool. its a bit like mm-basic. hope full you got cool options soon!

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +3

      I hope that PiccoloBASIC will become as advanced as MMBASIC. Plus there is the advantage that PiccoloBASIC is open source, whereas MMBASIC isn't.

    • @ZettDarkstone
      @ZettDarkstone 11 หลายเดือนก่อน +3

      @@GaryExplains Yeah that is really great stuff! cant wait! i love coding in basic. still doing that on my msx from 1984

    • @AdaptivePhenix
      @AdaptivePhenix 5 หลายเดือนก่อน

      ​@@GaryExplainsCatching up with the PicoMite is a very tall order indeed. Picomite, ArmMiteF4 and ArmMiteH7 are now open source.

  • @gregholloway2656
    @gregholloway2656 11 หลายเดือนก่อน +2

    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. 👍

    • @suki4410
      @suki4410 11 หลายเดือนก่อน +1

      I dont think PS/2 support would be useful. In the future will be no PS/2 be available. Either USB or a terminal.

    • @wayland7150
      @wayland7150 11 หลายเดือนก่อน

      @@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.

    • @Rickard05
      @Rickard05 11 หลายเดือนก่อน

      Picomite Also supports Color VGA

    • @another3997
      @another3997 5 หลายเดือนก่อน

      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. 😁

    • @absurdengineering
      @absurdengineering 5 หลายเดือนก่อน

      USB is not too hard on pico. Quite the opposite.

  • @Videogame9559
    @Videogame9559 5 หลายเดือนก่อน

    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

  • @devcybiko
    @devcybiko 11 หลายเดือนก่อน +1

    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.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +2

      Yes, absolutely.

    • @devcybiko
      @devcybiko 11 หลายเดือนก่อน +1

      @@GaryExplains Great project, Gary. Continued Success!

    • @suki4410
      @suki4410 11 หลายเดือนก่อน

      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.

    • @wayland7150
      @wayland7150 11 หลายเดือนก่อน

      @@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.

  • @dinozaurpickupline4221
    @dinozaurpickupline4221 11 หลายเดือนก่อน

    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

  • @tlmooney
    @tlmooney 11 หลายเดือนก่อน

    Piccolo basic. Can it be used just like Picomite basic( Geoff projects) -video from explaining computers. Thanks Tom

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน

      I made a whole video about how it can be used. Was there something I didn't cover?

  • @BrightBlueJim
    @BrightBlueJim 11 หลายเดือนก่อน

    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!

    • @another3997
      @another3997 5 หลายเดือนก่อน

      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.

    • @BrightBlueJim
      @BrightBlueJim 5 หลายเดือนก่อน

      @@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.

    • @BrightBlueJim
      @BrightBlueJim 5 หลายเดือนก่อน

      @@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.

    • @AndrewRoberts11
      @AndrewRoberts11 2 หลายเดือนก่อน

      have you looked at either MMBasic or PicoBB, asfull'ish Microsoft and BBC BASIC ports to the Pico?

    • @BrightBlueJim
      @BrightBlueJim 2 หลายเดือนก่อน

      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.

  • @keanuareeves
    @keanuareeves 11 หลายเดือนก่อน

    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.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน

      I had to retire Speed Test G, there wasn't enough interest. Sorry.

  • @yrath5034
    @yrath5034 11 หลายเดือนก่อน +3

    I'm not sure why the comments were deleted regarding Pico BBC BASIC?

    • @wayland7150
      @wayland7150 11 หลายเดือนก่อน +1

      BBC BASIC on the Pico would be cool. Does that exist?

  • @josephwatson4616
    @josephwatson4616 10 หลายเดือนก่อน

    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.

  • @hervelechat7432
    @hervelechat7432 11 หลายเดือนก่อน

    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.

    • @BrightBlueJim
      @BrightBlueJim 11 หลายเดือนก่อน

      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.

    • @another3997
      @another3997 5 หลายเดือนก่อน

      ​@@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.

    • @BrightBlueJim
      @BrightBlueJim 5 หลายเดือนก่อน

      @@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.

  • @guilherme5094
    @guilherme5094 11 หลายเดือนก่อน

    👍👍!

  • @johnhunt1725
    @johnhunt1725 11 หลายเดือนก่อน +1

    If you really want to impress me, write a BASIC compiler.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +2

      I am not trying to impress you 😜

    • @esra_erimez
      @esra_erimez 11 หลายเดือนก่อน

      @@GaryExplains Very well done

  • @tubeDude48
    @tubeDude48 11 หลายเดือนก่อน +1

    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?

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน +1

      IF ELSE is also included. See the 99 soda bottles demo.

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน

      Yes, good idea. I will upload the .uf2 file 👍

    • @tubeDude48
      @tubeDude48 11 หลายเดือนก่อน

      Thanks!

  • @PeterRichardsandYoureNot
    @PeterRichardsandYoureNot 5 หลายเดือนก่อน

    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.

    • @another3997
      @another3997 5 หลายเดือนก่อน

      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?

  • @Ratteler
    @Ratteler 9 หลายเดือนก่อน

    Does anyone make this kind of basic for a Pi4?

    • @GaryExplains
      @GaryExplains  9 หลายเดือนก่อน

      It wouldn't be hard to get it running on a Pi0/1/2/3/4.

  • @nugginusslover476
    @nugginusslover476 11 หลายเดือนก่อน

    What is wrong with the comments?

    • @GaryExplains
      @GaryExplains  11 หลายเดือนก่อน

      Eh?

    • @nugginusslover476
      @nugginusslover476 11 หลายเดือนก่อน +1

      @@GaryExplains I only saw troll comments about child labor and "your mom"

  • @MarquisDeSang
    @MarquisDeSang 11 หลายเดือนก่อน +1

    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.

    • @whothefoxcares
      @whothefoxcares 11 หลายเดือนก่อน

      Can you please make it more limmericky?

  • @crapmalls
    @crapmalls 11 หลายเดือนก่อน

    Let's see if I remember.
    10 print "your mom"
    20 goto 10