timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Sept 2015 Scratch release

Tue Sep 29, 2015 5:19 pm

With the new 'jessie' Raspbian comes a new Scratch. There'll be more extensive documentation appearing soon but the two headline items are
a) speed; the VM & image is now a Squeak Cog/Spur system. This means roughly 5x faster execution of non-graphics operations; remember we sped up the graphics a while ago. Anyone for Asteroid Blaster at 150fps?
b) a new built-in gpio server. It doesn't replace the socket based broadcasting so all of Simon's and Gerhard's work is still supported - indeed, it opens new options for cross-machine collaboration. It is a first pass at making a very simple to setup and use device driving framework and I hope to make big improvements based on your experiences playing with it.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

bfinio
Posts: 35
Joined: Mon Oct 14, 2013 8:53 pm

Re: Sept 2015 Scratch release

Tue Sep 29, 2015 7:28 pm

Where should we look out for the more extensive documentation? I asked about the GPIO documentation in a comment on the blog post and got this response from Simon Long:

"Scratch in this release includes a new GPIO server, which allows broadcast blocks to be used to set GPIO state and sensor blocks to be used to read GPIO state. I’ll have a look to see if this is documented in a useful fashion anywhere…"

but from some quick Google searching, I'm not really clear if there's a single centralized location for documentation about new RPi Scratch releases.

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Wed Sep 30, 2015 1:55 am

I've provided a big chunk of info to the folk at Pi Towers and it ought to appear somewhere soon - perhaps even as tomorrow's blog if we're lucky. Meanwhile if you look at the Scratch examples directory (just hit the Examples shortcut in the file open dialogue) at the Motors and Sensors folder then you should see a group of new example projects named gpio-*. They should illustrate the basics decently -and if not, let me know so I can improve them!
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

abee
Posts: 24
Joined: Wed Feb 27, 2013 5:47 am

Re: Sept 2015 Scratch release

Wed Sep 30, 2015 10:35 am

Hi, Tim
Thank you for your great work. The NuScratch seems works fine.
However Japanese translation files (ja.po and ja_HIRA.po) are degraded to very very old version.
I maintain those files on the MIT's Scratch translation server.
http://translate.scratch.mit.edu/ja/scratch1.4/ja.po
http://translate.scratch.mit.edu/ja_HIR ... ja_HIRA.po
Could you update them?
Thank you for your help.

Cheers,
Kazuhiro Abe

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Wed Sep 30, 2015 5:05 pm

I'm sorry to hear that - I'll add them to the list to fix!
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

mob-i-l
Posts: 204
Joined: Sat Dec 29, 2012 2:45 am
Location: Lund, Skåne/Scania, Sweden
Contact: Website Facebook Twitter YouTube

Re: Sept 2015 Scratch release

Sun Oct 04, 2015 11:06 pm

I tested Scratch 1.4 (Linux) 2015-09-15 in Raspbian Jessie and there is a bug concerning variables in the editor: when one adds a local variable (For this sprite only) and have no other variables before, one doesn't get the commands set, change, show, hide. If one creates a global variable one gets these commands.
Raspberry Pi0&1A&1B2&1B+&2B&3B w/ Raspbian. Started w/ BASIC on ABC80&ZX81 then Forth, Z80… http://scratch.mit.edu/users/mobluse/ https://github.com/mobluse/ https://www.youtube.com/MOBiL4u/ https://twitter.com/mobluse/

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Tue Oct 06, 2015 7:21 pm

Huh; well that *is* odd. I wonder how long that has been happening. After making a sprite variable, a global variable and another sprite variable it all seems to sort itself out, which is even odder.

Opened as https://github.com/raspberrypi/scratch/issues/151
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Wed Oct 07, 2015 11:25 pm

timrowledge wrote:I've provided a big chunk of info to the folk at Pi Towers and it ought to appear somewhere soon !
... and there it is. https://www.raspberrypi.org/blog/a-new- ... dded-gpio/

Enjoy. Make suggestions.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

plugwash
Forum Moderator
Forum Moderator
Posts: 3225
Joined: Wed Dec 28, 2011 11:45 pm

Re: Sept 2015 Scratch release

Thu Oct 08, 2015 12:36 am

Did you come to some agreement with the MIT guys about the trademark?

Fjl
Posts: 1
Joined: Thu Oct 08, 2015 8:43 pm

Re: Sept 2015 Scratch release

Thu Oct 08, 2015 9:08 pm

Is it possible now to use RPi serial port on GPIO14 & GPIO15 with new Scratch commands?

I'm thinking abut easy way to send commands to Ciseco XinoRF through Ciseco Slice of Radio that is connected to that serial port.

It was done using Python PySerial library like this: http://openmicros.org/index.php/article ... -part-2#19

iw1
Posts: 46
Joined: Mon Oct 13, 2014 8:10 am

Re: Sept 2015 Scratch release

Fri Oct 09, 2015 3:21 pm

I like the improvements. Thank you.
I've only found one problem so far. When I 'save picture of scripts' the file that's generated shows an error when I try to display it: "GIF file was missing some data (perhaps it was truncated somehow?)".
I suspect this will be a trivial problem to fix.

GeekTeacher
Posts: 16
Joined: Sun Jun 24, 2012 1:13 pm

Re: Sept 2015 Scratch release

Fri Oct 09, 2015 7:31 pm

Hi, is it possible to upgrade the Scratch suppiled in Wheezy to the new version with gpio support? Any details of how to install it appreciated.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4731
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sept 2015 Scratch release

Fri Oct 09, 2015 7:43 pm

GeekTeacher wrote:Hi, is it possible to upgrade the Scratch suppiled in Wheezy to the new version with gpio support? Any details of how to install it appreciated.
Could you please run

Code: Select all

sudo apt-get update
and then provide the output of

Code: Select all

apt-cache policy nuscratch

Michael_O
Posts: 20
Joined: Sat Oct 20, 2012 12:28 pm

Re: Sept 2015 Scratch release

Sat Oct 10, 2015 12:06 pm

[Copied from blog comments at Tim's suggestion]

This is all great news and the speed increases are very impressive. I have some queries about the motor control however. It looks as if this is only provided through one of the supported add-on boards? I have been using Simon’s ScratchGPIO for a good while now and there are two features I hope can be implemented easily in the new Scratch.

The first is stepper motor control which is very useful. I drive a stepper motor through a ULN2803 chip directly from the GPIO pins. It would be great if I could do this in the new Scratch.

The second point is more technical. PWM is often fixed at 100Hz or higher and this is fine for things like dimming LEDs but when you want to control DC motors the frequency becomes important; at low power factors such motors simply stall. The solution is to run them at more like 10Hz so that the motor is getting decent bursts of power and it is possible to control down to a few revs per second. I contacted Simon about this last year and he re-wrote the interface to reduce the frequency when power is below 20%.

Is it possible to add these in the new Scratch or if not is it possible they will be implemented sometime? I think they are both very useful for anyone wanting to control models or robots.

Michael

dmoss
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 2
Joined: Sun Jun 14, 2015 1:22 pm

Re: Sept 2015 Scratch release

Sat Oct 10, 2015 4:37 pm

ShiftPlusOne wrote:
GeekTeacher wrote:Hi, is it possible to upgrade the Scratch suppiled in Wheezy to the new version with gpio support? Any details of how to install it appreciated.
Could you please run

Code: Select all

sudo apt-get update
and then provide the output of

Code: Select all

apt-cache policy nuscratch
If this is useful, this is what I get when I run that code...

nuscratch:
Installed: 20150114-1
Candidate: 20150916
Version table:
20150916 0
500 http://archive.raspberrypi.org/debian/ wheezy/main armhf Packages
*** 20150114-1 0
100 /var/lib/dpkg/status

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4731
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sept 2015 Scratch release

Sat Oct 10, 2015 5:20 pm

dmoss wrote:If this is useful, this is what I get when I run that code...

Code: Select all

Installed: 20150114-1
Candidate: 20150916
The system hasn't been kept up to date. You occasionally need to run:

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade

iw1
Posts: 46
Joined: Mon Oct 13, 2014 8:10 am

Re: Sept 2015 Scratch release

Sun Oct 11, 2015 11:11 am

A minor problem, also found when saving picture of scripts...
In the 'Save Scripts Window' there are 3 folder option icons. Clicking either 'Compute' or 'pi' (current user) open up the appropriate folder but clicking on 'Desktop' opens up the current user's home folder (i.e. same effect as second option) not the desktop folder. The windows for other filer operations have the same 'feature'.

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Mon Oct 12, 2015 11:19 pm

Fjl wrote:Is it possible now to use RPi serial port on GPIO14 & GPIO15 with new Scratch commands?
Well, sorta-kinda. The PiLite is currently supported and that uses serial comms via gpio pins BUT it also requires some rather involved config stuff on your Pi.

For some sort of general serial support I'd need more info on sensible setups and I'd have to work out a usable framework for scripting it. Consider it on the list but please don't hold your breath!
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Mon Oct 12, 2015 11:24 pm

iw1 wrote:I like the improvements. Thank you.
I've only found one problem so far. When I 'save picture of scripts' the file that's generated shows an error when I try to display it: "GIF file was missing some data (perhaps it was truncated somehow?)".
I suspect this will be a trivial problem to fix.
Hmm, that's odd.
a) it used to work and nothing has been changed in that area
b) the gif opens perfectly well on my iMac
c) the gif opens perfectly in another Squeak system

So I'm forced to the conclusion the Raspbian provided image viewer has an issue :-)
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Mon Oct 12, 2015 11:38 pm

Michael_O wrote:[Copied from blog comments at Tim's suggestion]The first is stepper motor control which is very useful. I drive a stepper motor through a ULN2803 chip directly from the GPIO pins. It would be great if I could do this in the new Scratch.
Ah, but you can do that yourself and it should be trivial. You have full control over the pins; you (almost certainly) don't need any special driver at all. The caveat is that you may be speed limited when using a script to do it all. Depends. You can easily drive a Ryantek motor board direct from the gpio as well, for example.
Michael_O wrote:The second point is more technical. PWM is often fixed at 100Hz or higher and this is fine for things like dimming LEDs but when you want to control DC motors the frequency becomes important; at low power factors such motors simply stall. The solution is to run them at more like 10Hz so that the motor is getting decent bursts of power and it is possible to control down to a few revs per second.
So you'd want a way to set the pwm frequency? I *think* wiringPi can support that. Hmmm... looks plausible.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Tue Oct 13, 2015 12:07 am

iw1 wrote:Clicking either 'Compute' or 'pi' (current user) open up the appropriate folder but clicking on 'Desktop' opens up the current user's home folder (i.e. same effect as second option) not the desktop folder.
Good grief, so it does. That's a trivial typo that's been there a long time. I'll fix it ...
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

iw1
Posts: 46
Joined: Mon Oct 13, 2014 8:10 am

Re: Sept 2015 Scratch release

Tue Oct 13, 2015 4:22 pm

timrowledge wrote:
iw1 wrote:I like the improvements. Thank you.
I've only found one problem so far. When I 'save picture of scripts' the file that's generated shows an error when I try to display it: "GIF file was missing some data (perhaps it was truncated somehow?)".
I suspect this will be a trivial problem to fix.
Hmm, that's odd.
a) it used to work and nothing has been changed in that area
b) the gif opens perfectly well on my iMac
c) the gif opens perfectly in another Squeak system

So I'm forced to the conclusion the Raspbian provided image viewer has an issue :-)
Not quite so straightforward as this unfortunately. LibreOffice on both a Pi and a Windows 7 computer will also load the gif saved from the version of Scratch supplied with Jessie but, like the Raspian image viewer, Microsoft ImageViewer won't display it, neither can it be inserted into a Microsoft Word document, an error being reported. Microsoft Paint will load it but with a black background.
Whereas a gif produced using 'save picture of scripts' in Scratch 1.4 of 14-Jan-15 (running under Wheezy) will load into any of the programs mentioned above, including the Jessie image viewer, without error though there is also a black background in Microsoft Paint.

ghp
Posts: 1155
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Sept 2015 Scratch release

Tue Oct 13, 2015 6:43 pm

Hello,
the gif problem seems to be some sort of interop problem. Found an exported gif working with
- GIMP 2.8.2
- Internet explorer 11
- firefox 41
- inkscape 0.9.1
- vlc media player 2.2.1
- irfan view 4.38 shows background black, but in options this can be changed to display transparency.
- libreoffice 4.4.5
- chrome browser 45

IMHO (0.1) the gifs are ok.
Regards,
Gerhard

timrowledge
Posts: 1076
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Sept 2015 Scratch release

Thu Oct 15, 2015 12:20 am

ghp wrote:the gif problem seems to be some sort of interop problem.
Oh dear. Well there's another bug to work on; I guess the library used for exporting images has been 'improved' somewhere.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

ghp
Posts: 1155
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Sept 2015 Scratch release

Fri Oct 16, 2015 6:56 pm

Hello
think there are no gif-problems.
IMHO the gifs are ok.
It is also possible to import the script-gif to a sprite.
Regards,
Gerhard

Return to “Scratch”

Who is online

Users browsing this forum: No registered users and 3 guests