SCRATCH EXTENSION ARDUINO
To use the extension, upload the StandardFirmata program to your Arduino board and then open the Arduino extension on ScratchX.org.
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.
- Like the Arduino Uno.
- USB Cable
- Electronic components
- We recommend the Grove starter kit for Arduino (made by Seeed Studio). You can buy it from Maker Shed in the U.S. For other options, see working with basic electronic components below.
This is a brief description of each of the Scratch blocks included with the Arduino extension.
Runs when the device is connected
Connects an LED, button, or servo to a digital connection (D2, D3, D4, D5, D6, D7, D8).
Connects a rotation knob, light sensor, or temperature sensor to an analog connection (A0, A1, A2, A3).
Turns an LED on or off.
Sets an LED to a specified brightness from 0 – 100%.
Changes the current LED brightness by a specified amount.
Rotates a servo to a specified location from 0 – 180 degrees.
Changes a servo’s current rotation by a specified amount.
Runs when a button is pressed or released.
Checks if a button is currently pressed.
Runs when a rotation knob, light sensor, or temperator sensor meet a certain condition.
Reads the current value of a rotation knob, light sensor, or temperature sensor. Value will be between 0 – 100.
Turns a digital connection (D2, D3, D4, D5, D6, D7, D8) on or off.
Sets a capable digital connection (D3, D5, D6) to a value from 0 – 100%.
Checks if a digital connection (D2, D3, D4, D5, D6, D7, D8) is on or off.
Checks the current value of an analog connection (A0, A1, A2, A3).
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).