m
Line 1: Line 1:
{{stub|date=January 2020}}
 
 
 
{{block
 
{{block
|name = Tilt angle ()
+
| name       = Tilt Angle ()
|image = tilt angle [ v]::microbit
+
| image     = (tilt angle ( v) :: microbit)
|category =[[micro:bit]]
+
| sb        = 3.0
|type = [[Reporter Blocks|Reporter]]
+
| category   = [[micro:bit Extension|micro:bit]]
|sb=yes
+
| type       = [[Reporter Blocks|Reporter]]
 +
| added      = [[Scratch 3.0|3.0]]
 
}}
 
}}
  
The '''tilt angle''' block is a reporter block used as part of the [[micro:bit]] extension. This block will detect the angle of tilt in a certain direction. By default, the block checks for the tilt angle for the front but can be changed to detect the angle of 'back', 'left', or 'right' tilting.
+
The '''tilt angle () ''' block is a [[Reporter Blocks|reporter block]] and a [[micro:bit Extension|micro:bit]] block. Its options are "front", "back", "left", and "right". The block returns the micro:bit unit's tilt value in the specified direction.
  
 
== Example Uses ==
 
== Example Uses ==
Line 18: Line 17:
 
<scratchblocks>
 
<scratchblocks>
 
forever
 
forever
display text (tilt angle [left v]::microbit)::microbit
+
    display text (tilt angle (left v) :: microbit) :: microbit
 +
end
 
</scratchblocks>
 
</scratchblocks>
 
When the micro:bit is tilted left, the left tilt angle is displayed on the micro:bit.
 
When the micro:bit is tilted left, the left tilt angle is displayed on the micro:bit.
  
[[Category:Micro:bit]]
+
[[Category:Micro:bit Extension]]

Revision as of 00:11, 25 August 2020

Tilt Angle ()
(tilt angle ( v) :: microbit)
Category micro:bit
Type Reporter
Introduced in 3.0

The tilt angle () block is a reporter block and a micro:bit block. Its options are "front", "back", "left", and "right". The block returns the micro:bit unit's tilt value in the specified direction.

Example Uses

The block reports the angle which the micro:bit is tilted at.

Some example uses are:

  • Displaying the tilt angle
forever
    display text (tilt angle (left v) :: microbit) :: microbit
end

When the micro:bit is tilted left, the left tilt angle is displayed on the micro:bit.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.