Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Whiskers: Scratch 2.0 for Incompatible Devices
- 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
- 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.
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.
- Jonathan50
- Scratcher
1000+ posts
Whiskers: Scratch 2.0 for Incompatible Devices
Here's exactly how to do it:
Edit 2: I tried the installer, it definitely works well
- Right click on desktop, go new, shortcut.
- Click browse and find Squeak.exe, hit OK and Next
- Replace “Squeak” with “Whiskers” and hit Finish
- Move the shortcut somewhere nice
- Right click on it and hit Properties
- You should be in the Shortcut tab, else just click on it
- Click in the Target field and scroll to the end. Put a space, and then copy and paste the file path of Whiskers.image
- Hit OK and you're done
That's great I think the installer can do that.
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
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.
font-family: monospace;
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
Whoops. I'll do that right now! Is this open source? If so can you add the link to the OP.
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
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. Do you plan to make the menus look like Scratch 2.0 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
Thanks. I'll finish making this look nice tomorrow! @infinitytec: Can you please addto the CSS rule for the code blocks? Also here are instructions for macOS:font-family: monospace;
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.
Monospace is a good idea!
- eribetra
- Scratcher
100+ posts
Whiskers: Scratch 2.0 for Incompatible Devices
when backdrop switches to .backdrop[ v] :: hat eventsThere is an unnecessary period in this block.
- 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
There is an unnecessary mistake in this post.when backdrop switches to .backdrop[ v] :: hat eventsThere is an unnecessary period in this block.
((づ。◕‿‿◕。::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
There is an unnecessary mistake in this post.when backdrop switches to .backdrop[ v] :: hat eventsThere is an unnecessary period in this block.
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.
- eribetra
- Scratcher
100+ posts
Whiskers: Scratch 2.0 for Incompatible Devices
You noticed what I said was based on NoMod-Programming reply!?He already responded to me. -_-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. Wow! Whiskers is very good!
But the “define” block is horrible…
NoMod-Programming reply?
Last edited by eribetra (July 19, 2017 20:42:48)
- NoMod-Programming
- Scratcher
1000+ posts
Whiskers: Scratch 2.0 for Incompatible Devices
I fixed it in the latest release.You noticed what I said was based on NoMod-Programming reply!?He already responded to me. -_-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. Wow! Whiskers is very good!
But the “define” block is horrible…
NoMod-Programming reply?
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 its in /usr/lib/scratch2/scratch_extensions/piGPIOExtension.jsnew (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);
})();
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
SERIOUSLYYou noticed what I said was based on NoMod-Programming reply!?He already responded to me. -_-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. Wow! Whiskers is very good!
But the “define” block is horrible…
NoMod-Programming reply?
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
- Discussion Forums
- » Advanced Topics
- » Whiskers: Scratch 2.0 for Incompatible Devices