Shop OBEX P1 Docs P2 Docs Learn Events
Use MIT Scratch with Propeller with this Pico Imposter — Parallax Forums

Use MIT Scratch with Propeller with this Pico Imposter

RaymanRayman Posts: 14,041
edited 2015-09-28 14:17 in Propeller 1
Here's a .spin file that makes a Propeller board appear to be a Pico board for Scratch.
Scratch is a visual coding tool for kids at scratch.mit.edu

This version is special for Quickstart so you can interact with the Quickstart buttons.
The P0 button acts like the Pico button.
The other buttons act like the slider.

The Pico is one of the few built-in extensions to Scratch, making it easier to use.

Note: You will need to install a Scratch Browser Extension Plugin to make it work...
See here: https://scratch.mit.edu/info/ext_download/

There's also a demo Scratch program (the .sb2 file) that you can upload within Scratch.
Click the green flag to run.
Pushing the P0 Quickstart button makes the cat move.
The value of the slider (Other QS buttons) is also displayed.

Update: I've attached the full code here so you don't have to search for the QuickStart buttons driver.

Comments

  • RaymanRayman Posts: 14,041
    BTW: It looks pretty straightforward to create a custom (non Pico) version by modifying the JavaScript source code.
    It could then be used in ScratchX (but not Scratch unless MIT agrees to make it official).
  • Decidedly interesting. The Picoboard looks like fun, but the Prop is more capable.

    And Scratch is native on the Raspberry Pi critter.

    The Lego thing seems like an afterthought to their big name one.

    Convincing a QS board to pose as a Pico board using that Spin file will be a good thing.

  • Heater.Heater. Posts: 21,230
    Eek, requires FLASH and another plugin that won't run on Linux.
  • RaymanRayman Posts: 14,041
    Heater,

    Does Berkeley Snap! work on Linux? I think it might as it's all JavaScript...
    That one is very similar and extensions are also similar...
  • RaymanRayman Posts: 14,041
    I'm thinking that what is missing from Pico is feedback from PC to Pico...
    The Arduino example shows you how to turn an LED on.
    It would be nice to do that...

    What's nice about Propeller is that the Spin code is also fairly simple, and maybe kids could also look at that and understand it a little. The Arduino code is much more complex, in comparison...

    Anyway, I think there might be an opening for a Propeller version of Pico. But, with the addition of LEDs that you can turn on.
    It's always fun to turn on an LED...
  • RaymanRayman Posts: 14,041
    My 8yo was able to give the cat a gun and then we made it shoot a bat when Quickstart button P0 pushed :)
    1024 x 728 - 93K
  • Rayman wrote: »
    Here's a .spin file that makes a Propeller board appear to be a Pico board for Scratch.
    Scratch is a visual coding tool for kids at scratch.mit.edu

    This version is special for Quickstart so you can interact with the Quickstart buttons.
    The P0 button acts like the Pico button.
    The other buttons act like the slider.

    The Pico is one of the few built-in extensions to Scratch, making it easier to use.

    Note: You will need to install a Scratch Browser Extension Plugin to make it work...
    See here: https://scratch.mit.edu/info/ext_download/

    There's also a demo Scratch program (the .sb2 file) that you can upload within Scratch.
    Click the green flag to run.
    Pushing the P0 Quickstart button makes the cat move.
    The value of the slider (Other QS buttons) is also displayed.

    Update: I've attached the full code here so you don't have to search for the QuickStart buttons driver.

    Hello!
    Okay some other issues to consider. I just tried out your newer Spin example on a QS board under IE11 after redoing the code. It happens that when I tried it out under Chrome, I believed that the files were not loaded in order.

    Anyway under Chrome the application did not run properly. Now it works.

  • RaymanRayman Posts: 14,041
    edited 2015-09-29 12:31
    Glad you got it working!

    I did see that Chrome requires a different browser plug-in, maybe that's the trouble?
    Anyway, installing the browser plug-in is really the only tricky part here.
    It's a good idea to check your browser's list of installed plug-ins to make sure it's there if it's not working...

    By the way, Quickstart really isn't so bad for this... Pico has 8 sensors and QS has 8 buttons, so it kinda works.
    QS is also less expensive and can be used in many more ways...
  • Buck RogersBuck Rogers Posts: 2,172
    edited 2015-09-29 23:01
    Rayman wrote: »
    Glad you got it working!

    I did see that Chrome requires a different browser plug-in, maybe that's the trouble?
    Anyway, installing the browser plug-in is really the only tricky part here.
    It's a good idea to check your browser's list of installed plug-ins to make sure it's there if it's not working...

    By the way, Quickstart really isn't so bad for this... Pico has 8 sensors and QS has 8 buttons, so it kinda works.
    QS is also less expensive and can be used in many more ways...

    Yes indeed.
    What I find amusing is that the Raspberry PI has Scratch as a native. And we now have an IDE for the Prop for it. Talk to the people behind the little guy at their booth at a good sized Maker Faire, they would be quite impressed by it all. I did.

    Sparkfun who also sells the Pico (I suspect its one of their Red Board jobs.) was selling a widget who turns the Raspberry PI into a Lego controller. Both Scratch and Python can be used for that. (Then.)

    The second option for Scratch as a language to the outside is something from Lego. Probably to fill a "needed skill" that the Mindstorms does not have.....

    The Raspberry PI comes with Scratch 1.4. This is from Version 2 so everything inside the file won't run. However.... That version does support the other two. I wonder if the commands can be easily translated from one to the other?
    EDIT: Last sentence stricken.
Sign In or Register to comment.