Joseph Bradshaw / HOKUYO

Dependents:   mbed_Hokuyo_Example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers hokuyo.h Source File

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