Scratch

Learn about Scratch

Hat BLock
Hat Block
A Hat Block, is a block that is designed to start a script. This makes them essential for making projects. All hat blocks are either Control blocks, Events blocks.
Stack Block
Stack Block
A Stack block is a rectangular block that is shaped to fit above and below other blocks.
Reporter Block
Reporter Block
A reporter block is a block that contains a value. These blocks can contain anything, from numbers to strings.
boolean block
Boolean Blocks
A Boolean block is an elongated hexagonal block shaped after the boolean elements in flowcharts. A boolean block contains a condition. When the block is invoked, it acts as a reporter block, reporting "true" or "false".
C Block
C Block
A C block is a block that is shaped like a "C", so other blocks can fit inside it. These blocks perform the conditions and loops.
Cap Block
Cap Block
A Cap block is a block that is designed to stop a script or project from running, cancelling unwanted activity before it can start.
Motion Blocks
Motion Blocks
Motion blocks are color-coded medium-blue, and are used to control a sprite's movement. They are available only for sprites.
Looks Block
Looks Block
Looks block are color-coded purple, and are used to control a sprite's appearance.
Sound Blocks
Sound Blocks
Sound blocks are color-coded pink, and are used to control sound and MIDI functions.
Pen Blocks
Pen Blocks
Pen blocks are color-coded dark-green, and are used to control the pen aspect of the Scratch Program.
Data Blocks
Data Blocks
Variable Blocks are used to hold values and strings in variables, as well as display them using monitors.
Event Blocks
Event Blocks
Events blocks are color-coded burnt orange and are used to sense events, which trigger scripts to run. Event blocks are essential for every project: without the hat blocks from this category, a project would not be able to begin except by manually running scripts.
Control blocks
Control blocks
Control blocks are color-coded gold, and are used to control scripts.
Sensing Blocks
Sensing Blocks
Sensing blocks are color-coded light-blue, and are used to detect different factors of a project.
Operator Blocks
Operator Blocks
Operator blocks are color-coded light-green, and are used to script math equations and string handling.

Scratch Blocks

Arduino Extension

Arduino Program
Arduino Program
Arduino Program block is a Robot block and a Hat block. Scripts that wear this lock gets converted into Arduino code (when you right click and select upload code). This block is used when one has to upload a code into evive.
read digital pin ()
read digital pin ()
Read digital pin () block is a Robot block and a Boolean block. It reads the state of the digital pin on evive (“High” or “Low”). If the state of the pin is “High”, it returns True, else False.
read analog pin ()
read analog pin ()
Read analog pin () is a Robot block and a reporter block. It returns the value of analog pins available in evive. Analog reading is of 10 bit resolution, hence the range of value is 0 to 1023.
set digital pin () output as ()
set digital pin () output as ()
Set digital pin output is a Robot block and a stack block. It sets the digital state of specified digital pin either “High” or “Low”. If the output is High, the pin will be at 5V and if the output is Low the pin will be at 0V.
set PWM pin () output as ()
set PWM pin () output as ()
Set PWM pin output is a Robot block and a stack block. This block set PWM output on evive PWM pins. The user can select the output from a range of 0 to 255.  If the PWM output is 128, then half the time output will be High and for rest, output will be Low.
play tone pin () on note () beat ()
play tone pin () on note () beat ()
Play tone block is a Robot block and a stack block. When it is executed it plays the tone of specified frequency/note for a specific duration/beat.
set servo pin () angle as ()
set servo pin () angle as ()
Set servo block is a Robot block and a stack block. When it is executed, it sets the servo angle to the specified angle. The angle can vary from 0 to 180 degree.
serial write text ()
serial write text ()
Serial write block is a Robot block and a stack block. This block sends signal from evive to computer through serial monitor. This is used mainly for debugging in Arduino mode (that is, to print the values and commands). You can give string, numbers and anything else.
Serial available bytes
Serial available bytes
Serial available bytes block is a Robot and a reporter block. It is used to get number of bytes available on serial monitors to read. Here, the communication is from computer to evive. So through this command evive monitors if there any bytes available?
serial read byte
serial read byte
Serial read byte block is a Robot and a reporter block. It is used to read the commands available at serial monitor one by one (byte by byte). In this case, communication is from computer to evive.
read ultrasonic sensor trig pin () echo pin ()
read ultrasonic sensor trig pin () echo pin ()
Read ultrasonic sensor block is a Robot block and a reporter block. It’s used for measuring the distance from an ultrasonic sensor. It returns distance in cm.
Timer
Timer
Timer block is a Robot block and a reporter block. It returns the time passed since the device is turned ON or since the timer has be reset. This block returns time in milliseconds.
reset timer
reset timer
Reset timer block is a Robot block and a stack block. The block sets the timer's value back to 0.0. Usually the timer must be reset at the beginning of a project for the Timer block to hold the right value.

evive Inbuilt Functions Extension

Upload Firmware
Upload Firmware
This block uploads evive firmware from which user can use menu based system to accomplish various simple tasks.
Tactile switch () pressed
Tactile switch () pressed
Tactile Switch block is a Boolean block which returns “TRUE” if the switch is pressed and “False” if the switch is not pressed.
Slide switch () is in state ()
Slide switch () is in state ()
Slide switch () is in state () block checks takes the slide switch number (1 or 2) and state to be checked for (Up or Down) as input and returns “True” if the slide switch is in the specified state.
Potentiometer () reading
Potentiometer () reading
evive has two potentiometers. Potentiometer () Reading block returns the analog output of either of the potentiometer (from 0-1023).
Channel () touched
Channel () touched
Channel () touched check if the specified channel is touched, if yes, then the block returns “True”, else it returns false.
Navigation key is in direction ()
Navigation key is in direction ()
Navigation key is in direction () block checks if the navigation key is in one of the four particular directions.
Navigation key z is pressed
Navigation key z is pressed
evive has a 5-way navigation key, which has a key that can be pressed. Navigation key z pressed block returns “True” if pressed, else it returns “False”.
Run motor () in direction () with speed ()
Run motor () in direction () with speed ()
Run motor () in direction () with speed () takes the motor port, direction of rotation and speed of rotation as input from the user and moves the motor.
set clock to () hours () minutes () seconds
set clock to () hours () minutes () seconds
Set clock block sets the time on evive’s Real Time Clock (RTC) to the time specified by the user though drop down menu in the input.
check clock for ()
check clock for ()
check clock for () returns the value of “hours”, “minutes” or “seconds” from evive’s Real Time Clock.
set date to ()/()/() and weekday ()
set date to ()/()/() and weekday ()
Set date to ()/()/() and weekday () sets the date and weekday on evive’s RTC to the time specified by the user though drop down menu in the input.
check date for ()
check date for ()
check date for () block returns the value of “date”, “month”, “year” or “weekday” from evive’s Real Time Clock

evive TFT Screen Extension

evive Program
evive Program
evive Program block is a Robot block and a Hat block. Scripts that wear this block gets converted into Arduino code and can be uploaded on evive.
fill screen with () colour
fill screen with () colour
Fill screen with () block is used to change the colour of the entire TFT screen.
Set cursor at ()()
Set cursor at ()()
The Set cursor at ()() block is found under the Robotics palette in the extension evive TFT display. It sets the cursor at the specified coordinate.
Set text size as ()
Set text size as ()
The Set text size as () is found under the Robotics palette in the extension evive TFT display. This block changes the size of text on the TFT display.
Set text colour () with background ()
Set text colour () with background ()
The Set text colour () with background () sets a text colour (choose from drop down) and a particular background colour for the text.
Write ()
Write ()
The Write () block is found under the Robotics palette in the extension evive TFT display. This block is used to write text on evive’s TFT display.
Draw line from ()() to ()() colour ()
Draw line from ()() to ()() colour ()
This block allows you to enter the coordinates of two points and joins them using a straight line of the specified colour which you can choose from the drop-down menu.
Draw vertical line from ()() length () colour ()
Draw vertical line from ()() length () colour ()
The Draw vertical line from () to length () colour () block takes the coordinates of the starting point of a line as input along with length and colour.
Draw horizontal line from ()() length () colour ()
Draw horizontal line from ()() length () colour ()
The Draw horizontal line from ()()  length () colour () block takes the coordinates of the starting point of a line as input along with length and colour.
Draw rectangle from ()() width () height () colour ()
Draw rectangle from ()() width () height () colour ()
The Draw rectangle block takes the coordinates of a point as input alongside the required width, height and colour and draws the outline of a rectangle.
Draw round rectangle from ()() width () height () radius () colour ()
Draw round rectangle from ()() width () height () radius () colour ()
It takes the following parameters as input: starting coordinates, width, height, radius at corners and colour and draws a rectangle rounded at edges.
Draw circle from centre ()() radius () colour ()
Draw circle from centre ()() radius () colour ()
Draw circle from centre ()() radius () colour () block takes the centre and the radius of the circle from the user and draws an outline of a circle.
Fill rectangle from ()() width () height () colour ()
Fill rectangle from ()() width () height () colour ()
It takes the coordinates of a point as input alongside the required width, height and colour and draws a rectangle, completely colouring it.
Fill round rectangle from ()() width () height () radius () colour ()
Fill round rectangle from ()() width () height () radius () colour ()
This block takes the following parameters as input: starting coordinates, width, height, radius at corners and colour and draws a filled rectangle round.
Fill circle from centre ()() radius () colour ()
Fill circle from centre ()() radius () colour ()
The Fill circle from centre ()() radius () colour () block takes the centre and the radius of the circle from the user and draws a filled circle.