This article or section documents something only available on the Raspberry Pi version of Scratch 3.0.
When Tilted ()
when tilted [forward v]:: extension hat
Category Raspberry Pi Sense HAT
Type Hat
Introduced in 3.0

The when tilted () block is a Raspberry Pi Sense HAT block and a hat block. Its options are "forward", "backward", "left", and "right". It fires when the Raspberry Pi Sense HAT unit is tilted in the specified direction.

Example Uses

  • Moving the sprite in the tilted direction
when tilted [forward v]:: extension hat
change y by [10]

when tilted [backward v]:: extension hat
change y by [-10]
  • Triggering a specific event on the stage
when titled [left v]::extension hat
broadcast [easter egg v]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.