Discuss Scratch

Jonathan50
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Aw, ok.

Not yet a Knight of the Mu Calculus.
Wettining
Scratcher
500+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

hehehe, you can zoom up to x1000 whereas it used to be limited to x400 or x500
infinitytec
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Windows instructions are up! If you have a Mac or Linux: can you please get me instructions.
Also, the Raspberry Pi instructions may be out of date. Can someone check?


Not here much, but sometimes I lurk.
God has a plan. He has a plan for everything, and everyone.
Jonathan50
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

You can make a Whiskers shortcut on your desktop.

Edit: I'll post exactly what I did.

Last edited by Jonathan50 (July 19, 2017 04:04:58)


Not yet a Knight of the Mu Calculus.
infinitytec
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Jonathan50 wrote:

You can make a Whiskers shortcut on your desktop.

Edit: I'll post exactly what I did.
I think the installer can do that.


Not here much, but sometimes I lurk.
God has a plan. He has a plan for everything, and everyone.
Jonathan50
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Here's exactly how to do it:
  1. Right click on desktop, go new, shortcut.
  2. Click browse and find Squeak.exe, hit OK and Next
  3. Replace “Squeak” with “Whiskers” and hit Finish
  4. Move the shortcut somewhere nice
  5. Right click on it and hit Properties
  6. You should be in the Shortcut tab, else just click on it
  7. Click in the Target field and scroll to the end. Put a space, and then copy and paste the file path of Whiskers.image
  8. Hit OK and you're done
Edit:

infinitytec wrote:

I think the installer can do that.
That's great
Edit 2: I tried the installer, it definitely works well

Last edited by Jonathan50 (July 19, 2017 04:13:27)


Not yet a Knight of the Mu Calculus.
Jonathan50
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

@infinitytec: Can you please add
font-family: monospace;
to the CSS rule for the code blocks? Also here are instructions for macOS:

Download the Whiskers image file, and download the Squeak VM for macOS from squeak.org and unzip it. If you like you can rename the app to Whiskers and drag it into your Applications folder.

Now right click on the app and select the option “Show Package Contents” and double click Contents and Resources. Look through the files and find the default image file. The name starts with “Squeak”, then the Squeak version number and “-32bit”.

Click on it, and then click again, to select the file's name. Copy the name and then you can click out of it. Now go back to the Whiskers image file and rename it to be called the same as the image file you found earlier.

Now drag the Whiskers image file into the Resources folder. You'll be asked what you want to do with the old one, and hit “Replace”.

Whiskers should now be properly set up. You should be able to double-click on the app to open Whiskers.

Last edited by Jonathan50 (July 19, 2017 04:47:09)


Not yet a Knight of the Mu Calculus.
Blaze349
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Is this open source? If so can you add the link to the OP.
NoMod-Programming
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Blaze349 wrote:

Is this open source? If so can you add the link to the OP.
Whoops. I'll do that right now!

Long-since moved on from Scratch, if you need to find all my posts, search this in google: 3499447a51c01fc4dc1e8c3b8182b41cb0e88c67
Jonathan50
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Do you plan to make the menus look like Scratch 2.0 again?

Not yet a Knight of the Mu Calculus.
NoMod-Programming
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Jonathan50 wrote:

Do you plan to make the menus look like Scratch 2.0 again?
I'll add that to my to-do list, but my old method for drawing it was very buggy and slow, so I'll have to redo it again.

Long-since moved on from Scratch, if you need to find all my posts, search this in google: 3499447a51c01fc4dc1e8c3b8182b41cb0e88c67
infinitytec
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Jonathan50 wrote:

@infinitytec: Can you please add
font-family: monospace;
to the CSS rule for the code blocks? Also here are instructions for macOS:

Download the Whiskers image file, and download the Squeak VM for macOS from squeak.org and unzip it. If you like you can rename the app to Whiskers and drag it into your Applications folder.

Now right click on the app and select the option “Show Package Contents” and double click Contents and Resources. Look through the files and find the default image file. The name starts with “Squeak”, then the Squeak version number and “-32bit”.

Click on it, and then click again, to select the file's name. Copy the name and then you can click out of it. Now go back to the Whiskers image file and rename it to be called the same as the image file you found earlier.

Now drag the Whiskers image file into the Resources folder. You'll be asked what you want to do with the old one, and hit “Replace”.

Whiskers should now be properly set up. You should be able to double-click on the app to open Whiskers.
Thanks. I'll finish making this look nice tomorrow!
Monospace is a good idea!


Not here much, but sometimes I lurk.
God has a plan. He has a plan for everything, and everyone.
eribetra
Scratcher
100+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

when backdrop switches to .backdrop[ v] :: hat events
There is an unnecessary period in this block.

Check out Blockode, the most recent Scratch 1.4 mod!
Also check out Five Nights at eribetra:
NoMod-Programming
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Before I leave for the next week, does anybody know where I can find the source for the Pi GPIO extension for Scratch 2 from the raspberry pi? I want to see if I there's a solution that can allow Whiskers to load some extensions made for Scratch 2, but I need to check the source.

Long-since moved on from Scratch, if you need to find all my posts, search this in google: 3499447a51c01fc4dc1e8c3b8182b41cb0e88c67
SimpleScratch
Scratcher
500+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

its in /usr/lib/scratch2/scratch_extensions/piGPIOExtension.js
new (function() {
var ext = this;
var fs = require('fs');

// Cleanup function when the extension is unloaded
ext._shutdown = function ()
{
for (pin = 2; pin < 28; pin++)
{
if (fs.existsSync("/sys/class/gpio/gpio" + pin))
fs.writeFileSync("/sys/class/gpio/unexport", pin, "utf8");
}
};

// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function ()
{
return {status: 2, msg: 'Ready'};
};

ext.set_gpio = function (pin, val)
{
if (pin === '' || pin < 0 || pin > 27) return;

var dir = 0, lev;
if (val == 'output high') lev = 1;
else if (val == 'output low') lev = 0;
else dir = 1;

// check the pin is exported
if (!fs.existsSync("/sys/class/gpio/gpio" + pin))
fs.writeFileSync("/sys/class/gpio/export", pin, "utf8");

// the ownership of direction takes time to establish, so try this until it succeeds
while (true)
{
try {
fs.writeFileSync("/sys/class/gpio/gpio" + pin + "/direction", dir == 0 ? "out" : "in", "utf8");
break;
}
catch (error) {
continue;
}
}

// set the output value
if (dir == 0)
fs.writeFileSync("/sys/class/gpio/gpio" + pin + "/value", lev == 1 ? "1" : "0", "utf8");
};

ext.get_gpio = function (pin)
{
if (pin === '' || pin < 0 || pin > 27) return;

// check the pin is exported
if (!fs.existsSync("/sys/class/gpio/gpio" + pin))
fs.writeFileSync("/sys/class/gpio/export", pin);

// read the pin value
var data = fs.readFileSync ("/sys/class/gpio/gpio" + pin + "/value", 'utf8');

if (data.slice(0,1) == "1") return true;
else return false;
};

// Block and block menu descriptions
var descriptor = {
blocks: [
[' ', 'set gpio %n to %m.outputs', 'set_gpio', '', 'output high'],
['b', 'gpio %n is high?', 'get_gpio', ''],
],
menus: {
outputs: ['output high', 'output low', 'input'],
}
};

// Register the extension
ScratchExtensions.register('Pi GPIO', descriptor, ext);
})();
Penguin5664
Scratcher
100+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

eribetra wrote:

when backdrop switches to .backdrop[ v] :: hat events
There is an unnecessary period in this block.
There is an unnecessary mistake in this post.

((づ。◕‿‿◕。::sensing)づ::sensing) // This is "Mini-Bloky". He protects my signature from the kumquats!
How many Block Requests we can get? Please request! Check @78ch3's Everything Shop, too!
when gf clicked :: #B46200
vector :: #C56B00
scratch :: #DA8B00
blocks! :: control
eribetra
Scratcher
100+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Penguin5664 wrote:

eribetra wrote:

when backdrop switches to .backdrop[ v] :: hat events
There is an unnecessary period in this block.
There is an unnecessary mistake in this post.

Can you please STOP making fun of me?

Also, I wrote the block exactly how it it is on Whiskers, so there is no unnecessary mistake on my post.

Check out Blockode, the most recent Scratch 1.4 mod!
Also check out Five Nights at eribetra:
eribetra
Scratcher
100+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

Penguin5664 wrote:

eribetra wrote:

Penguin5664 wrote:

eribetra wrote:

Wow! Whiskers is very good!

But the “define” block is horrible…
Sorry man but NoMod-Programming explained before he was still working on the define hat, it's buggy and yeah. He got to draw an ellipse but that was slow.
He already responded to me. -_-
You noticed what I said was based on NoMod-Programming reply!?

NoMod-Programming reply?

Last edited by eribetra (July 19, 2017 20:42:48)


Check out Blockode, the most recent Scratch 1.4 mod!
Also check out Five Nights at eribetra:
NoMod-Programming
Scratcher
1000+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

eribetra wrote:

Penguin5664 wrote:

eribetra wrote:

Penguin5664 wrote:

eribetra wrote:

Wow! Whiskers is very good!

But the “define” block is horrible…
Sorry man but NoMod-Programming explained before he was still working on the define hat, it's buggy and yeah. He got to draw an ellipse but that was slow.
He already responded to me. -_-
You noticed what I said was based on NoMod-Programming reply!?

NoMod-Programming reply?
I fixed it in the latest release.

SimpleScratch wrote:

its in /usr/lib/scratch2/scratch_extensions/piGPIOExtension.js
new (function() {
var ext = this;
var fs = require('fs');

// Cleanup function when the extension is unloaded
ext._shutdown = function ()
{
for (pin = 2; pin < 28; pin++)
{
if (fs.existsSync("/sys/class/gpio/gpio" + pin))
fs.writeFileSync("/sys/class/gpio/unexport", pin, "utf8");
}
};

// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function ()
{
return {status: 2, msg: 'Ready'};
};

ext.set_gpio = function (pin, val)
{
if (pin === '' || pin < 0 || pin > 27) return;

var dir = 0, lev;
if (val == 'output high') lev = 1;
else if (val == 'output low') lev = 0;
else dir = 1;

// check the pin is exported
if (!fs.existsSync("/sys/class/gpio/gpio" + pin))
fs.writeFileSync("/sys/class/gpio/export", pin, "utf8");

// the ownership of direction takes time to establish, so try this until it succeeds
while (true)
{
try {
fs.writeFileSync("/sys/class/gpio/gpio" + pin + "/direction", dir == 0 ? "out" : "in", "utf8");
break;
}
catch (error) {
continue;
}
}

// set the output value
if (dir == 0)
fs.writeFileSync("/sys/class/gpio/gpio" + pin + "/value", lev == 1 ? "1" : "0", "utf8");
};

ext.get_gpio = function (pin)
{
if (pin === '' || pin < 0 || pin > 27) return;

// check the pin is exported
if (!fs.existsSync("/sys/class/gpio/gpio" + pin))
fs.writeFileSync("/sys/class/gpio/export", pin);

// read the pin value
var data = fs.readFileSync ("/sys/class/gpio/gpio" + pin + "/value", 'utf8');

if (data.slice(0,1) == "1") return true;
else return false;
};

// Block and block menu descriptions
var descriptor = {
blocks: [
[' ', 'set gpio %n to %m.outputs', 'set_gpio', '', 'output high'],
['b', 'gpio %n is high?', 'get_gpio', ''],
],
menus: {
outputs: ['output high', 'output low', 'input'],
}
};

// Register the extension
ScratchExtensions.register('Pi GPIO', descriptor, ext);
})();
Thanks! I'll see if I can do something about either a limited javascript interpreter or some kind of other way of loading scratch 2.0 extensions

Long-since moved on from Scratch, if you need to find all my posts, search this in google: 3499447a51c01fc4dc1e8c3b8182b41cb0e88c67
Penguin5664
Scratcher
100+ posts

Whiskers: Scratch 2.0 for Incompatible Devices

eribetra wrote:

Penguin5664 wrote:

eribetra wrote:

Penguin5664 wrote:

eribetra wrote:

Wow! Whiskers is very good!

But the “define” block is horrible…
Sorry man but NoMod-Programming explained before he was still working on the define hat, it's buggy and yeah. He got to draw an ellipse but that was slow.
He already responded to me. -_-
You noticed what I said was based on NoMod-Programming reply!?

NoMod-Programming reply?
SERIOUSLY

These are REPLIES, not like you're CALLING someone.

((づ。◕‿‿◕。::sensing)づ::sensing) // This is "Mini-Bloky". He protects my signature from the kumquats!
How many Block Requests we can get? Please request! Check @78ch3's Everything Shop, too!
when gf clicked :: #B46200
vector :: #C56B00
scratch :: #DA8B00
blocks! :: control

Powered by DjangoBB