Xiaofei Qiu / EasyVR3_LED_Library
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers EasyVR.h Source File

EasyVR.h

00001 #pragma once
00002 #include "mbed.h"
00003 #include "protocol.h"
00004 
00005 // @author Stephane Rochon
00006 
00007 class EasyVR
00008 {
00009 public:
00010     /** EasyVR use Serial communication*/
00011     EasyVR(PinName tx,PinName rx);              
00012     ~EasyVR();                                  
00013     
00014     /** Send a command to EasyVR to excute EasyVR build in routine*/
00015     void sendCmd(uint8_t);             
00016     
00017     /** Send a argument for the routine */
00018     void sendArg(int8_t);                       
00019 
00020     /** Receive return value from EasyVR routine */
00021     int8_t recv(int8_t timeOut = 1);         
00022        
00023     /** Decrypt returned value from EasyVR */
00024     void decrypt(char*);                        
00025     
00026     /** Used for awake EasyVR, default time out value to 100*/
00027     bool awake(int timeOut = 100);              
00028     
00029     
00030 private:
00031     Serial _easyVR;
00032 };