SPIKE-RT C API Reference [English]
An RTOS-based software platform for LEGO® Education SPIKE™.
Functions
ultrasonicsensor.h File Reference

API for ultrasonic sensors. More...

#include <stdint.h>
#include <spike/pup_device.h>

Go to the source code of this file.

Functions

pup_device_tpup_ultrasonic_sensor_get_device (pbio_port_id_t port)
 Get the PUP device pointer of the ultrasonic sensor specified with the port ID. More...
 
int32_t pup_ultrasonic_sensor_distance (pup_device_t *pdev)
 Get the distance by a ultrasonic sensor. More...
 
bool pup_ultrasonic_sensor_presence (pup_device_t *pdev)
 Check a ultrasonic signal by a ultrasonic sensor. More...
 
pbio_error_t pup_ultrasonic_sensor_light_set (pup_device_t *pdev, int32_t bv1, int32_t bv2, int32_t bv3, int32_t bv4)
 Set the four light brightneses of the ultrasonic sensor. More...
 
pbio_error_t pup_ultrasonic_sensor_light_on (pup_device_t *pdev)
 Set the four light brightneses of the ultrasonic sensor. More...
 
pbio_error_t pup_ultrasonic_sensor_light_off (pup_device_t *pdev)
 Set the four light brightneses of the ultrasonic sensor. More...
 

Detailed Description

API for ultrasonic sensors.

Author
Shu Yoshifumi