Instructions

LED color, so it will be dim. The more time the pulse is high, the more power is
delivered to the LED color and the brighter it will be.
The accelerometer measures forces acting on the micro:bit in the x, y and z
dimensions.
Because gravity is acting on the micro:bit then if the micro:bit is completely flat, then
the there will be the gravitational force on the Z dimension (up/down) but no forces
in the X (left/right) or Y (front/back). However, as soon as you tilt the micro:bit, some
of the gravitational pull will be felt on the Y and Y dimensions too.
The code reads the X, Y and Z forces separately and uses them to control the
brightness of the red, green and blue channels respectively.
The constrain block ensures that if the output brightness of each channel does not
exceed the maximum value of 1023, or go negative.
Page 13