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

API for force sensors. More...

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

Go to the source code of this file.

Functions

pup_device_tpup_force_sensor_get_device (pbio_port_id_t port)
 Get the PUP device pointer of the force sensor specified with the port ID. More...
 
float pup_force_sensor_force (pup_device_t *pdev)
 Get the force detected by a force sensor. More...
 
float pup_force_sensor_distance (pup_device_t *pdev)
 Get the distance how much force sensor's button has moved. More...
 
bool pup_force_sensor_pressed (pup_device_t *pdev, float force)
 Check a force sensor's button is pressed. More...
 
bool pup_force_sensor_touched (pup_device_t *pdev)
 Check a force sensor's button is touched. More...
 

Detailed Description

API for force sensors.

Author
Kajita Shun