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.
fep_kinect.cpp
00001 #include"fep_kinect.h" 00002 00003 fep_kinect::fep_kinect(PinName tx,PinName rx,uint8_t addr,int baud) : 00004 fep_(tx,rx,addr,baud) 00005 { 00006 fep_.startReceive(2); 00007 } 00008 00009 00010 uint16_t fep_kinect::get_distance() 00011 { 00012 return data_[0]; 00013 } 00014 00015 uint16_t fep_kinect::get_mode() 00016 { 00017 return data_[1]; 00018 } 00019 void fep_kinect::newdata() 00020 { 00021 fep_.getData(data); 00022 data_[2] = (int(data[0]) << 8) | int(data[1]); 00023 data_[1] = data_[2] % 10; 00024 data_[0] = data_[2] / 10; 00025 }
Generated on Mon Jul 18 2022 16:42:46 by
1.7.2