BlocosIA Wiki Editor

Raspberry Pi

GPIO pins, servos and computer vision with the Raspberry camera.

On the Raspberry, download and run /raspberry/blocosia_pi.py (python3 blocosia_pi.py). Open BlocosIA in the Raspberry's own browser and connect to ws://localhost:8765.

To use it: in the editor, click "Extensions" (bottom corner) and add "Raspberry Pi".

Stack

GPIO pin [4] [on]

Does an action. Snap it below another block.

Stack

GPIO pin [4] at intensity ( ) %

Does an action. Snap it below another block.

Stack

servo on GPIO [4] to ( ) degrees

Does an action. Snap it below another block.

Hat

when GPIO [4] turns [on]

Starts a script when this happens.

Boolean

GPIO [4] on?

Answers true or false. Use it in "if", "repeat until" and "wait until".

Stack

Raspberry camera vision: [off]

Does an action. Snap it below another block.

Reporter

faces seen by the Raspberry

Gives a number or text. Put it inside a round slot.

Reporter

[x] of the object seen by the Raspberry

Gives a number or text. Put it inside a round slot.

Reporter

motion on the Raspberry camera

Gives a number or text. Put it inside a round slot.

Boolean

Raspberry connected?

Answers true or false. Use it in "if", "repeat until" and "wait until".