SPIKE-RT C API Reference [English]
An RTOS-based software platform for LEGO® Education SPIKE™.
|
API for color sensors. More...
#include <stdint.h>
#include <spike/pup_device.h>
#include <pbio/color.h>
Go to the source code of this file.
Data Structures | |
struct | pup_color_rgb_t |
Returns the raw RGB values measured by the color sensor. More... | |
Typedefs | |
typedef pbio_color_hsv_t | pup_color_hsv_t |
Get the color of surface or an extra source by a color sensor. More... | |
Functions | |
pup_device_t * | pup_color_sensor_get_device (pbio_port_id_t port) |
Get the PUP device pointer of the color sensor specified with the port ID. More... | |
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) |
Get the color of surface or an extra source by a color sensor. More... | |
int32_t | pup_color_sensor_reflection (pup_device_t *pdev) |
Get the percentage of how much a surface reflects the light emmited by the sensor. More... | |
int32_t | pup_color_sensor_ambient (pup_device_t *pdev) |
Get the ambient light intensity. More... | |
pbio_error_t | pup_color_sensor_light_set (pup_device_t *pdev, int32_t bv1, int32_t bv2, int32_t bv3) |
Set the three light brightneses of the color sensor. More... | |
pbio_error_t | pup_color_sensor_light_on (pup_device_t *pdev) |
Set the three light brightneses of the color sensor. More... | |
pbio_error_t | pup_color_sensor_light_off (pup_device_t *pdev) |
Set the three light brightneses of the color sensor. More... | |
pup_color_hsv_t * | pup_color_sensor_detectable_colors (int32_t size, pup_color_hsv_t *colors) |
Configure colors which color sensor should detect. More... | |
API for color sensors.