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.
Roomba.h
00001 #include "mbed.h" 00002 //#include "Data.h" 00003 00004 #ifndef __ROOMBA_H_INCLUDED__ 00005 #define __ROOMBA_H_INCLUDED__ 00006 00007 00008 /** 00009 * ルンバ制御クラス 00010 */ 00011 class Roomba { 00012 public: 00013 struct Mode 00014 { 00015 enum EMode 00016 { 00017 Off, 00018 Passive, 00019 Safe, 00020 Full 00021 }; 00022 }; 00023 00024 Roomba(PinName tx, PinName rx); 00025 00026 bool mode(Roomba::Mode::EMode m); 00027 //Mode getMode(); 00028 bool start(); 00029 bool drive (int rightWheelVelocity, int leftWheelVelocity); 00030 bool battery(int* batteryCapacity); 00031 00032 protected: 00033 Serial _s; 00034 00035 private: 00036 Roomba::Mode::EMode _mode; 00037 }; 00038 00039 #endif
Generated on Sat Jul 16 2022 09:17:49 by
