|
SPIKE-RT C API Reference [Japanese]
An RTOS-based software platform for LEGO® Education SPIKE™.
|
API for color sensors [詳解]
#include <stdint.h>#include <spike/pup_device.h>#include <pbio/color.h>データ構造 | |
| struct | pup_color_rgb_t |
| カラーセンサのRGB値を返す. [詳解] | |
型定義 | |
| typedef pbio_color_hsv_t | pup_color_hsv_t |
| カラーセンサで色を測定する。 [詳解] | |
関数 | |
| pup_device_t * | pup_color_sensor_get_device (pbio_port_id_t port) |
| ポートIDで指定されたカラーセンサへのPUPデバイスポインタを取得する。 [詳解] | |
| pup_color_rgb_t | pup_color_sensor_rgb (pup_device_t *pdev) |
| pup_color_hsv_t | pup_color_sensor_color (pup_device_t *pdev, bool surface) |
| pup_color_hsv_t | pup_color_sensor_hsv (pup_device_t *pdev, bool surface) |
| カラーセンサで色を測定する。 [詳解] | |
| int32_t | pup_color_sensor_reflection (pup_device_t *pdev) |
| センサーの発する光を表面がどの程度反射するかを測定する。 [詳解] | |
| int32_t | pup_color_sensor_ambient (pup_device_t *pdev) |
| 周囲の光の強度を測定する。 [詳解] | |
| pbio_error_t | pup_color_sensor_light_set (pup_device_t *pdev, int32_t bv1, int32_t bv2, int32_t bv3) |
| カラーセンサのライトを設定する。 [詳解] | |
| pbio_error_t | pup_color_sensor_light_on (pup_device_t *pdev) |
| カラーセンサのライトを点灯する。 [詳解] | |
| pbio_error_t | pup_color_sensor_light_off (pup_device_t *pdev) |
| カラーセンサのライトを消灯する。 [詳解] | |
| pup_color_hsv_t * | pup_color_sensor_detectable_colors (int32_t size, pup_color_hsv_t *colors) |
| カラーセンサが検知する色を設定する。 [詳解] | |
API for color sensors