Programming with Kittenblock: Onboard Sensors

There are multiple onboard sensors on Futureboard.

../../_images/kbbanner.png

Onboard Sensors Blocks

../../_images/sensors_en.png

Sample Program: Buttons

Pressing the buttons changes the color.

../../_images/sensors_code1en.png

Sample Program: Temperature and Light sensors

The sensor values are shown on the screen.

../../_images/sensors_code2en.png

Sample Program: Accelerometer and Gyroscope

Please refer to the following figure for the axis orientation.

../../_images/gyro.png

The acceleration values are shown on the screen.

../../_images/sensors_code3en.png

Sample Program: Gestures

The Futureboard can detect 8 gestures:

  1. ‘shake’

  2. ‘freefall’

  3. ‘tilt_up’

  4. ‘tilt_down’

  5. ‘tilt_left’

  6. ‘tilt_right’

  7. ‘face_up’

  8. ‘face_down’

Shake the FutureBoard for a sound.

../../_images/sensors_code4en.png

Sample Program: Gesture Triggers

Shake the FutureBoard for a sound.

Note: Trigger Events only work when the program is uploaded onto the FutureBoard.

../../_images/sensors_code5en.png

Sample Program: Gyroscope

Shows the roll and pitch of the FutureBoard.

../../_images/sensors_code6en.png

Sample Program: Magnetic Sensor

The magnetic sensor has a range of ±800(μT)。

The magnetic strengths are shown on FutureBoard.

../../_images/sensors_code7en.png

The magnetic sensor needs to be calibrated before use.

../../_images/calibrate.jpg

Sample Program: Compass

The compass returns a compass bearing, with 0 indicating North.

The compass bearing is shown.

../../_images/sensors_code8en.png