llk / scratchx Goto Github PK
View Code? Open in Web Editor NEWScratch Extension Site
Home Page: https://github.com/llk/scratchx
Scratch Extension Site
Home Page: https://github.com/llk/scratchx
Edit:
It seems Chrome dropped NPAPI support. The Arduino Scratch extension needs to support PPAPI in order to work on future versions of Chrome.
ScratchX won't connect with the Arduino on Windows 8.1 / Chrome 45 (Yellow connection icon in ScratchX), even with the 'previous' plugin version as mentioned in the docs. On the same configuration, Leap Motion does work with ScratchX.
The browser console keeps mentioning: "Attempting connection with COM8".
The board's LED's blink in a relatively complex but repeated pattern which seems to be:
L - Twice
RX - Once
L - Twice
L - Once
RX - Once
L - Three times
TX - Once (short)
RX - Once (short)
TX and RX simultaniously - Twice
I'm not sure if the above is of much use, but let me know if you need additional information.
Both "ScratchEd" and the "ScratchJr" links on the navigation bar points to http://scratch.mit.edu (Scratch's main site) when they are supposed to link to http://scratched.gse.harvard.edu/ (ScratchEd) and http://www.scratchjr.org/ (ScratchJr).
New link: https://scratch.mit.edu/discuss/48/
I’m having trouble creating my extension - where can I get help?
Once you’ve published your code on Github, post a link to it in the Scratch extension developers forum asking other developers for help.
If you load multiple extensions into a .sbx project and save it, when you reopen it, only the last extension loaded in will load. The rest of the extensions don't.
on homepage:
Note: To use any physical extensions, you need to download the Hardware Plugin.
'Hardware Plugin' should point instead to:
https://scratch.mit.edu/info/ext_download/
[ moved from https://github.com/scratchfoundation/scratch-extension-docs/issues/10 ]
I'm not certain about the semantics for this; perhaps there is something like ext.trigger('greenFlag'). In any event, it would be particularly helpful in large extensions.
The plugin crashes while trying to load a project that uses the Scratch Browser Plugin on Windows 8.1
Chrome 43: The editor fails to load and instead displays the "Aw Snap!" error message
Firefox 38.0.1: The editor fails to load and TypeError: Scratch.FlashApp.$ASobj is undefined
is output to the console.
If I disable the plugin, the ScratchX editor loads fine.
Procedure to reproduce:
Hi,
I am running a local version of Scratchx in rural schools w/o broadband as per issue #38 and
it is working fine, thanks! However, I'm finding the missing sprite library quite a nuisance to younger
students. Is it possible to generate the sprite library in the same manner as done in the Scratch2 offline editor? Specifically in the Scratch2/media/libs dir there is a Python script named "generate-costume-library.py" which appears to be processing all of the sprites in the media lib. Is there a way to run this process in my local web server on its local copy of the Scratch2/media/libs dir so that the sprite library renders in the local webserver version? I am willing to modify source code if necessary.
It's really confusing to someone browsing the repo to just see a README and LICENSE unless they switch branches to the Github Pages branch.
To change the default branch, a project owner needs to go to the "settings" pane (under issues, pull requests, and graphs) and click on the dropdown box that says "master".
When trying to open a serial device using this:
"device.open({ stopBits: 1, bitRate: 115200, ctsFlowControl: 0 });"
the Scratch Device Plugin crashes and reports this in the browser console:
"Error opening serial device COM23: Error: Error calling method on NPObject!"
If stopBits is set to 0, it works fine.
I am using Mozilla Firefox 40.0.3 and Scratch Device Plugin 2.1.2.1 on Windows 7.
Could the FAQ be updated to also clarify what will happen to http extensions within Scratch offline/online in Nov 2015?
Thanks.
http://scratchx.org/#faq-expermintal-official
Probably you meant "experimental".
From @khanning:
I received a couple of reports that the Arduino extension isn't working properly with Chrome. After taking a look at the issue it seems like the receive handler is being called twice each time data is read.
To test this, I set up an Arduino with a simple firmware that starts at 0, increments by 1 each second, and writes the digit to the serial port. Everything behaves as expected on Firefox, each digit is received by the receive handler (0 1 2 3 4 ...). However, on Chrome each digit gets received by receive handler twice (0 0 1 1 2 2 3 3 ...). I was able to confirm this behavior on both OS X 10.9 and Windows 10 with the latest version of Chrome and the Chrome helper/device host plugin.
This would not be very disruptive to the PicoBoard, but I'm sure there are many devices and protocols which would not function in these circumstances.
When we decide which version of the device plugin to connect to, Edge is detected incorrectly and tries to use the Chrome path. This throws an exception and might be the reason that extensions (even ones that don't use hardware) are not currently working in Edge.
The browser goes back to the page that was open before scratchx.org. That seems unexpected.
Steps to Reproduce:
More projects which exhibit the issue can be found at:
http://creativecomputerlab.com/makesense-2.html#datamode
From a user on Windows 7 using Firefox on the main Scratch site:
We’ve been using Firefox. Typically, we like to use Google Chrome, however after installing the PicoBoard plugin (it is a .MSI file), the PicoBoards still would not connect. So we switched over to Firefox, which seems to be working a bit better for us.
Most cases, the first time we open a browser and connect the PicoBoard, the indicator is red or yellow. So we then have to close the browser and start again. Once we’ve done this, the indicator is green when we connect the PicoBoard and the students are set to code. Unfortunately, if the students save, close out of the editor, and try to work on this project again at a later time, the indicator is red and the PicoBoard does not connect anymore. Our solution for this is to backpack every sprite (with it’s codes) and then transfer them to a new editor page. Here we can connect the PicoBoard and continue coding.
If you attempt to download a ScratchX project twice, the second download does not overwrite the first one. Instead '.sbx' is appended twice to the filename. A dialog should popup asking if you want to replace or cancel.
Steps to reproduce:
File > Save Project
ProjectName.sbx
File > Save Project
ProjectName.sbx.sbx
Items from the previous project are still visible on the editor. It seems it should have a new empty project instead.
Upgraded to a shiny new scratch group account! We should point to '[email protected]' in the following places:
The MakeSense device (http://makesense.co) exposes 3 HID interfaces and the Scratch plugin cannot seem to connect to any of them. The interfaces are:
?\hid#vid_04d8&pid_f46a&mi_00#7&e3da3d9&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} - 0
?\hid#vid_04d8&pid_f46a&mi_01#7&3214e19b&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} - 0
?\hid#vid_04d8&pid_f46a&mi_02#7&32de4c95&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} - 0
The device is known to work fine when connected to other SW via standard HID APIs.
If you are half-way through creating a project and you hit back/refresh/close on the browser, there's no warning prompt to save. This may lead to someone unexpectedly losing data.
Since hat blocks appear to be executed asynchronously, it can be difficult to toggle multiple instances on and off. This can be demonstrated in the alarm_extension.js example. If there are multiple active "when alarm goes off" hat blocks, only one gets executed. This is because the alarm_went_off variable is reset after the first hat block is executed.
It seems like the best way to workaround to is to use some sort of reset timer to change the variable back to false. However, since the reset timer would have to use some arbitrary amount of time, this solution is not ideal.
new (function() {
var ext = this;
var alarm_went_off = false; // This becomes true after the alarm goes off
var reset_timer = null;
// Cleanup function when the extension is unloaded
ext._shutdown = function() {};
// Status reporting code
// Use this to report missing hardware, plugin or unsupported browser
ext._getStatus = function() {
return {status: 2, msg: 'Ready'};
};
ext.set_alarm = function(time) {
if (reset_timer) {
clearTimeout(reset_timer);
reset_timer = null;
alarm_went_off = false;
}
window.setTimeout(function() {
alarm_went_off = true;
}, time*1000);
};
ext.when_alarm = function() {
if (alarm_went_off === true) {
if (!reset_timer) {
setTimeout(function() {
alarm_went_off = false;
reset_timer = null;
}, 1000);
}
return true;
}
return false;
};
// Block and block menu descriptions
var descriptor = {
blocks: [
['', 'run alarm after %n seconds', 'set_alarm', '2'],
['h', 'when alarm goes off', 'when_alarm'],
]
};
// Register the extension
ScratchExtensions.register('Alarm extension', descriptor, ext);
})();
Is there a better way to handle these situations?
The boilerplate code in the developer documentation starts with
(function (ext) {
and because Brackets kept giving me errors about it, I removed the first left bracket. However, bad things happen since I removed it, and I began to wonder, is that a valid code? There is no closing bracket for the first left bracket. Google search reveals nothing.
Thanks.
This is correcting something which is incorrect regarding the plugin.
Change 'Any' --> 'Many' in description of device plugin download:
Note: To use any physical extensions, you need to download the Hardware Plugin.
If the user doesn't have Flash installed, then the buttons on the ScratchX homepage just seem to not do anything. It would be nice to show an error message somewhere to let the user know why things are broken.
I am making scratchx + arduino app.
Arduino extension example of scratchx main site only works in firefox browser now.
(Chrome doesn't support NPAPI now.)
So I have a idea to make this can work in any browser using nw.js.
But, When I click ''Load Experimental Extension' in chromium or explorer, they stopped.
I guess modal(?) css can't work well in these browser.
Do you have any idea to close this dialog(full screen blue dialog) ?
If it's not possible,
Please add x(close) button on 'Load Experimental Extension' dialog.
Blue screen looks like below.
http://www.codeme.kr/x4a/screen.png
I am creating a ScratchX extension, and have the code
var descriptor = {
blocks: [
[' ', 'Connect to IP %m.ipSelection', 'ipConnect', 3]
],
menus: {
ipSelection: ['Loading IPs, please wait...']
},
};
as my descriptor object. I basically want the user to choose from a list of IP addresses to connect to.
However, my problem is that the IP addresses take a few seconds to load into my js file, and when I use the code
descriptor.menus.ipSelection = newIPs;
to try and update the menu in the block, it updates the descriptor object, but not the contents of the menu in the block.
Is there a way for me to be able to update the menu inside one of the blocks?
Thanks
The costume library and the sound library are missing. I have a temporary fix in place for the sprite library and the background library, but it may be worthwhile to solve this by making the editor SWF get the library items from scratch.mit.edu
When using 'R' blocks, a callback is supposed to be passed as a parameter... it doesn't seem to work.
Edit: This happens on the Scratch Website, not ScratchX.
My program does not require a plugin since it uses its own servers connected via Websocket. Is there a way for me to suppress the user from seeing this message.
The dialog box says "See the tips window on the right to install plug-in and get extension working".
I set the status indicator in Scratch to green only after the first board is connected to Xi server, but when this occurs is up to the user.
Would it be possible when specifying the block text in the .js file to also specify a block color?
I am writing an extension that will have similar functionality for several hardware devices and would like to classify/separate the device types by color.
Also, it would be nice to be able to draw a separator line between any given blocks so that "classes" of extension blocks would be more apparent.
I require an offline version of Scratchx due to my work in rural locations. Is it possible for
me to host a version of Scratchx on my own local web server? Is the file structure of this
repository such that I can clone them to a location where I can point a web server to serve them?
If so, I'd like to host them using a simple NodeJs server. Are there any special things to consider as this
is a Flash app?
Hi, I've created a standalone web server to serve Scratchx in environmnets without an internet connection. Now I wish to be able to load extensions from the local file system in the same manner as loading a local .sbx file. Is it possible to make a mod so that I get a local file chooser dialog when I choose to load an extension?
Looks like the link currently is to https://github.com/LLK/. Should it be to the scratcx repo specifically, i.e. https://github.com/LLK/scratchx?
If I open an example project that contains spaces in it's name, the spaces appears as %20 in the scratchx editor window (see screenshot).
I am having a problem using ScratchX with hardware devices either Lego Wedo or Arduino. In both the problem is the same, the hardware device is connected to the laptop but it always show the yellow circle on ScratchX project. What might be the problem ?
Thanks
After a lot of experimentation, I was finally able to get the following code to run - http://screencast.com/t/3pQu4Nu7 - generating a pop and moving the servo between two positions. I did a Save Project to the local file system.
The green light is still on and when I do a File>Load Project from the local file system, the code is loaded and the green light is changed to yellow. The code runs and I hear the pop, but the servo does not move.
What is the proper way to Save the project and then Load the project and have the servo work?
Is there an example where the code is loaded and ScratchX is connected to the Arduino so that the code will run and move the servo?
I touched the servo and it is very hot. I unplugged the Arduino and the servo cooled down.
Thanks
Chuck.
Steps to reproduce:
You will observe that the home page does not come back up. This does not appear to be a problem when clicking "Open Editor" from http://scratchx.org/ (rather than http://scratchx.org/#home), but is when you are coming from the #home
fragment specifically.
My extension http://scratchx.org/?url=http://MrYsLab.github.io/xi4s.js opens in chrome but not in firefox on ubuntu 15.04 32 bit. Version of Firefox is 38.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.