Blocks are puzzle-piece shapes that are used to create code in Scratch. The blocks connect to each other vertically like a jigsaw puzzle, where each data type (hat block, stack block, reporter block, boolean block, or cap block) has its own shape and a specially shaped slot for it to be inserted into, which prevents syntax errors.
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” string values or the numbers “1” and “0” depending on their usage in a script.
A reporter block is a block that contains a value. These blocks can contain anything, from numbers to strings. Boolean Blocks are a special form of reporter blocks that report either “true” or “false”. To quickly view the value of a reporter, simply click it in the editor and a bubble will display the value.
A Stack block is a rectangular block that is shaped to fit above and below other blocks. Stack blocks make up the majority of the blocks available in Scratch, being available in every category except Operators.
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.
The Stage is the term for the background of the project but can have scripts, backdrops (costumes), and sounds, similar to a sprite. It has some restrictions on sprite functionality, such as motion and size blocks.
Sprites, either user-created, uploaded, or found in the sprites library, are the objects that perform actions in a project. While the Stage can also be programmed in a project, most projects have at least one sprite as well because only sprites can move.
A costume is one out of possibly many "frames" or alternate appearances of a sprite. Sprites can change their look to any of its costumes. They can be named, edited, created, and deleted, but every sprite must have at least one costume. One of the most common uses of costumes is to make an animation for a game or other project.
The block palette is an area of the graphical user interface located between the stage, sprite pane and scripting area. The blocks are located to the right of the categories, which can be clicked to automatically scroll to that category. The whole list can be scrolled through.
evive extension allows you to control the inbuilt functionalities of evive such as the tactile-switches, slide-switches, potentiometer, motors, a 5-way navigation key, touch inputs, and Real Time Clock.
The block reports the distance of the nearest object from an ultrasonic sensor. It returns distance in cm. The trigger pin and echo pin are connected to a digital pin of evive which can be selected from the drop-down menu.
Dabble phone sensor module give the real-time reading of the following sensors to evive: Accelerometer, gyroscope, proximity sensor, magnetometer, light meter, sound meter, GPS, temperature sensor and barometer. This block reports the current value of the selected sensor.
Dabble input module have 2 slide switch type input, having states left, right and off. This block reports if the selected slide switch is in the selected state in real-time. If the slide switch is in that state, then it returns true else false.
The block returns the real-time value of the selected parameter (X value, Y value, radial value, and angle) form the joystick and accelerometer mode of the Gamepad module of the Dabble app. You can choose the parameter from the drop-down menu.
There are 10 digital buttons in the gamepad module, whose data is sent to the device when they are pressed or released. The block reports whether the button is currently pressed on the gamepad or not. If the chosen button is pressed, then it returns true, else it returns false.
The block allows the user to control the brightness of LED connected to digital pins of the device using Dabble app. You can enter the pin number to which your device is connected and vary the brightness in the app.
When the block is executed it plays the tone of specified frequency/note for a specific duration/beat. The note and the beat can be selected from the drop-down menu. Also, the user can input the specific frequency and duration (in milliseconds).
The 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, the output will be Low.
The block returns the value of analog pins available in the connected hardware. Analog reading is of 10-bit resolution, hence the range of value is 0 to 1023. This range is mapped to the voltage of the pin (normally 0 to 5V). If the value received is 512, the voltage value will be around 2.5V.
evive has a 5-way navigation key, 4 of them are for up, down, right and left direction. This block checks if the navigation key is in one of the four particular directions. The direction for which you wish to check is your choice and can be chosen from the drop down on the block.
The block check 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 and “False” if it is not in the specified state.
evive has two tactile switches; this block checks if either of them is pressed. The switch whose state you want to check can be chosen from the drop-down menu on this block. It returns “true” if the switch is pressed and “false” if the switch is not pressed.
The block is used to draw an outline of the triangle or a filled triangle from three points on evive TFT display. It takes the color and the 3 points for the corner of the triangle to draws a triangle.
The block is used to draw an outline of the ellipse or a filled ellipse of a specified X length, Y length and center position on evive TFT display. It takes the color, center, X length and Y length of the ellipse from the user and draws an ellipse.
The block is used to draw an outline of the circle or a filled circle of a specified radius and center position on evive TFT display. It takes the center and the radius of the circle from the user and draws an outline of a circle.
This block is used to draw the outline or a filled rectangle with rounded corners. It takes the following parameters as input: fill/draw, starting coordinates, width, height, the radius at corners and color. It draws a rectangle rounded at edges where the radius is input by the user.