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.
Dependents: mbed_Hokuyo_Example
hokuyo.h
00001 // J Bradshaw 20160304 00002 #include "mbed.h" 00003 00004 #ifndef HOKUYO_H 00005 #define HOKUYO_H 00006 00007 #define MAXBUFSIZE 1024 00008 00009 /** A Hokuyo Lidar interface */ 00010 class Hokuyo { 00011 public: 00012 Hokuyo(PinName tx, PinName rx); 00013 00014 int lidar_read(char *str, int numchars, float timeoutDelay); //serial read function with timout (for large and non ASCII data strings) 00015 int Read_Scan(float scan_deg, int clust_size); //send scan command and read data 00016 int Init(void); //Initialize the Hokuyo lidar 00017 00018 int numPts; //total number of points scanned from Read_Scan function 00019 float angle[MAXBUFSIZE]; //angle array 00020 int dist_mm[MAXBUFSIZE]; //distance array 00021 private: 00022 Serial _hokuyo; //serial port connected to Hokuyo 00023 00024 }; 00025 00026 #endif
Generated on Fri Jul 15 2022 05:42:18 by
