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.
See the Hardware page for an explaination of digital vs. analog connections
Connects a rotation knob, light sensor, or temperature sensor to an analog connection.
See the Hardware page for an explaination of digital vs. analog connections
Turns an LED on or off.
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.
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 on or off.
See the Hardware page for an explaination of digital vs. analog connections
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
See the Hardware page for an explaination of digital vs. analog connections
Checks if a digital connection is on or off.
See the Hardware page for an explaination of digital vs. analog connections
See the Hardware page for an explaination of digital vs. analog connections
Checks the current value of an analog connection.
See the Hardware page for an explaination of digital vs. analog connections
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).