This is a brief description of each of the Scratch blocks included with the Arduino extension.
30 |Runs when the device is connected
35 |Connects an LED, button, or servo to a digital connection.
42 |See the Hardware page for an explaination of digital vs. analog connections
43 |Connects a rotation knob, light sensor, or temperature sensor to an analog connection. 50 |
See the Hardware page for an explaination of digital vs. analog connections
51 |Turns an LED on or off.
58 |Sets an LED to a specified brightness from 0 - 100%.
If you go above 100, a value of 100 will be used.
If you go below 0, a value of 0 will be used.
Changes the current LED brightness by a specified amount.
A positive value will make the LED get brighter and a negative value will make it get dimmer.
Rotates a servo to a specified location from 0 - 180 degrees.
If you go above 180, a value of 180 will be used.
If you go below 0, a value of 0 will be used.
Changes a servo's current rotation by a specified amount.
A negative value will make the servo rotate in the opposite direction.
Runs when a button is pressed or released.
93 |Checks if a button is currently pressed.
100 |Runs when a rotation knob, light sensor, or temperator sensor meet a certain condition.
107 |
Reads the current value of a rotation knob, light sensor, or temperature sensor. Value will be between 0 - 100.
114 |Turns a digital connection on or off.
121 |See the Hardware page for an explaination of digital vs. analog connections
122 |Sets a capable digital connection to a value from 0 - 100%.
If you go above 100, a value of 100 will be used.
If you go below 0, a value of 0 will be used.
See the Hardware page for an explaination of digital vs. analog connections
130 |See the Hardware page for an explaination of digital vs. analog connections
138 |Checks if a digital connection is on or off.
145 |See the Hardware page for an explaination of digital vs. analog connections
146 |See the Hardware page for an explaination of digital vs. analog connections
154 |Checks the current value of an analog connection.
161 |See the Hardware page for an explaination of digital vs. analog connections
162 |Maps a value between two ranges of numbers. This example might be used to map an analog sensor's value (0 to 100) to a sprite's x position (-240 to 240).
169 |You will need to use the Firefox web browser for this extension to work
43 |Download and install the Scratch Extensions Browser Plugin for "other web browsers"
44 |*There is an issue with the Chrome version of the Scratch Extensions Browser Plugin that is preventing the Arduino extension from working properly in the Chrome web browser
45 | 46 |Launch the extension by going to the following URL:
49 | http://scratchx.org/?url=http://khanning.github.io/scratch-arduino-extension/arduino_extension.js 50 | 51 |NOTE: On Firefox, you might see "Allow scratchx.org to run "Scratch Device?". Click "Allow...".
52 |You might see another message, "Allow scratchx.org to run plugins?". Set both Adobe Flash and Scratch Device to "Allow and Remember" and click okay.
54 |When you see the indicator light in the "More Blocks" tab turn green your ready to start using the extension!
59 |See the section on the homepage for Supported Languages, for information on alternate block tanslations.
61 |Now take a look at the Scratch Blocks and the example projects to learn how to use the extension. 62 | 63 |
The Grove Base Shield (V2) connects your Arduino board to the other Grove modules. It has different kinds of connections:
35 |To connect a module to the shield, plug one of the Grove cables into the white connector on the module and one of the connectors on the shield. The cable only goes into the connector one way.
44 | 45 |A button you can press
49 |Measures light
55 |Control things by rotating the knob
61 |Measures temperature
67 |A small light
73 |Moves its arm back and forth
79 |This Scratch extension lets you interact with the physical world using an Arduino board. For example, you can control lights and motors or measure light and temperature. The extension communicates with an Arduino board running the Firmata firmware.
31 | 32 |The Arduino extension uses ScratchX, which is the Experiemental Extension system for the Scratch programming language.
33 | 34 |For full instructions on using the extension, see the Getting Started page.
49 | 50 |If you run into any problems using the extension, file an issue on Github
51 | 52 |If you already know what to do you can launch the extension on ScratchX
53 | 54 | 55 |Block translations have been provided for the following languages:
58 |To set the block language, add &lang=XX to the ScratchX URL.
Where XX = one of the two letter language codes above
Example for German:
http://scratchx.org?url=http://khanning.github.io/scratch-arduino-extension/arduino_extension.js&lang=de
If you would like to help out by providing block translations for another language, please see the Github issue.
82 | 83 |