![]() It means that users can use access the GPIO pins “out of the box,” and so get into physical computing that much more easily. We’re really pleased that GPIO is now built in to the Pi version of Scratch. In the Scratch Examples directory (found via the File->Open dialogue and then the Examples shortcut) you will find a Sensors and Motors directory several new GPIO scripts are included, including the one above. We can also plug in Pi add-on cards such as the Sense HAT, Pibrella, Explorer HAT, PiFace, PiLite and Ryanteck motor board.Įach card has its own set of commands layered on top of the basic GPIO facilities described above. For example, the following scripts (along with a suitably configured breadboard) provide the ability to turn LEDs on and off according to a button, to take a photo with a countdown provided by a progressively brightening LED, and ways to check the time etc.Įxamples of using Scratch to control the camera module, control LEDs connected to the Raspberry Pi’s GPIO pins, and check the time Add-On Hardware The server also allows access to the Pi camera, IP address and date and time and allows complex functionality. We have not introduced any new blocks at this point. It is modelled on the mesh/network server and uses the same internal API so that either or both can be used at any time – indeed, you can have both working and use a Pi as a sort of GPIO server or data source. The new GPIO server for Pi Scratch is a first pass at a new and hopefully simpler way for users to connect Scratch to the Raspberry Pi’s GPIO pins or to add-on boards plugged into them. ![]() The same Model B with the latest Scratch system can manage about 12-15 frames per second, and on a Raspberry Pi 2 we can get a bit over 30, making a very playable Pac-Man. The original release of Scratch on the Raspberry Pi Model B could manage almost one frame per second, at best. Our favourite “scary big demo” is Andrew Oliver’s implementation of Pac-Man. Since Scratch uses a lot of graphics and UI code it doesn’t always speed up so much but we already did a lot of graphics speed improvements for prior releases. Things will get even faster in the future as we iron out wrinkles in the code generation, and soon we hope to start benefiting from another project that does code optimization on the fly early hints suggest at least a doubling of performance. With a very generous amount of support from Eliot Miranda – the original author of the Cog virtual machine and all-round software deity – the ARM Cog VM has been whirring away since around June.īenchmarks are always a nastily slippery subject, but we feel that Squeak performance is typically between 3 and 10 times faster, obviously depending on what exactly one is measuring. Along with work to improve the Squeak code that implements Scratch, we then had a noticeably faster system.Ī major project this year has been building such a virtual machine for the Pi until now, only x86 machines have been able to run this version. It also built us a Scratch that could run on the very latest Squeak virtual machines that have dynamic code translation, generating machine code at run-time. ![]() One of the big projects last year was to modernize the Scratch code to run in a current Squeak Smalltalk system rather than the very old original version this improved performance a fair bit all on its own, since the newer Squeak benefited from a lot of work over the years. the addition of a built-in GPIO server.There are two primary changes you will notice: It might have seemed a bit quiet on the Scratch front since March, but lots has happened here in the rainforests of Vancouver Island. ![]() Tim Rowledge, who has been “vigorously wrangling Scratch into shape over the last couple of years” (thanks Eben), tells us what’s new:Īlong with the new Raspbian release we are including the latest Scratch system update. Connect buttons, sensors, cameras, LEDS, goblin sticks and other gubbins to your Pi using Scratch ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |