Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
LIDAR Class Reference
This is a device driver class for the Slamtec RP LIDAR A1. More...
#include <LIDAR.h>
Public Member Functions | |
| LIDAR (RawSerial &serial) | |
| Creates a LIDAR object. | |
| virtual | ~LIDAR () |
| Stops the lidar and deletes this object. | |
| short | getDistance (short angle) |
| Returns the distance measurement of the lidar at a given angle. | |
| short | getDistanceOfBeacon () |
| Returns the distance to a detected beacon. | |
| short | getAngleOfBeacon () |
| Returns the angle of a detected beacon. | |
| void | lookForBeacon () |
| This method implements an algorithm that looks for the position of a beacon. | |
Detailed Description
This is a device driver class for the Slamtec RP LIDAR A1.
Definition at line 16 of file LIDAR.h.
Constructor & Destructor Documentation
| LIDAR | ( | RawSerial & | serial ) |
| ~LIDAR | ( | ) | [virtual] |
Member Function Documentation
| short getAngleOfBeacon | ( | ) |
| short getDistance | ( | short | angle ) |
| short getDistanceOfBeacon | ( | ) |
| void lookForBeacon | ( | ) |
This method implements an algorithm that looks for the position of a beacon.
It should be called periodically by a low-priority background task.
dist_diff_start[n]=i; n++;
printf(" start: %d \r\n",i);
dist_diff_stop[m]=i; m++; printf(" stop: %d \r\n",i);
for(i=0;i<10;i++){ printf(" %d: %d ", i,dist_diff_start[i]); } printf("\n\r") ; for(i=0;i<10;i++){ printf(" %d: %d ", i,dist_diff_stop[i]); }
Generated on Thu Jul 14 2022 09:02:36 by
1.7.2