SPIKE-RT C API Reference [English]
An RTOS-based software platform for LEGO® Education SPIKE™.
Loading...
Searching...
No Matches
ultrasonicsensor.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * API for ultrasonic sensors
5 *
6 * Copyright (c) 2022-2023 Embedded and Real-Time Systems Laboratory,
7 * Graduate School of Information Science, Nagoya Univ., JAPAN
8 */
9
34#ifndef _PUP_ULTRASONIC_SENSOR_H_
35#define _PUP_ULTRASONIC_SENSOR_H_
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#include <stdint.h>
42#include <spike/pup_device.h>
43
59
74
91
106 int32_t bv1, int32_t bv2, int32_t bv3, int32_t bv4);
107
121
135
136#ifdef __cplusplus
137}
138#endif
139
140#endif // _PUP_ULTRASONIC_SENSOR_H_
141
pbio_error_t pup_ultrasonic_sensor_light_on(pup_device_t *pdev)
Set the four light brightneses of the ultrasonic sensor.
Definition ultrasonicsensor.c:53
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.
Definition ultrasonicsensor.c:46
bool pup_ultrasonic_sensor_presence(pup_device_t *pdev)
Check a ultrasonic signal by a ultrasonic sensor.
Definition ultrasonicsensor.c:33
pbio_error_t pup_ultrasonic_sensor_light_off(pup_device_t *pdev)
Set the four light brightneses of the ultrasonic sensor.
Definition ultrasonicsensor.c:57
int32_t pup_ultrasonic_sensor_distance(pup_device_t *pdev)
Get the distance by a ultrasonic sensor.
Definition ultrasonicsensor.c:19
pup_device_t * pup_ultrasonic_sensor_get_device(pbio_port_id_t port)
Get the PUP device pointer of the ultrasonic sensor specified with the port ID.
Definition ultrasonicsensor.c:14
Definition pup_device.c:21