ロボカップジュニアサッカー IRM2121を用いた専用パルスボールを検知するためのライブラリ
Dependents: BallCheck_IRM2121_InterrputInAdd CatPot_SensorRight
IRM2121 Class Reference
IRM2121 class, based on an InterruptIn pin, and a timer use RoboCup Junior Soccer to find PULSE BALL. More...
#include <IRM2121.h>
Public Member Functions | |
IRM2121 (PinName IRM_PIN) | |
Create a IRM2121 object connected to the specified InterruptIn pin. | |
void | Set (void) |
Set a IRM2121 Interrupt Pin. | |
unsigned long | Read (void) |
Read the result. | |
void | ReturnVB (bool *valid, bool *busy) |
Check two flags( _Valid, _Busy ) |
Detailed Description
IRM2121 class, based on an InterruptIn pin, and a timer use RoboCup Junior Soccer to find PULSE BALL.
Example:
// Set interrupt and read sensor. #include "mbed.h" #include "IRM2121.h" IRM2121 IR(p21); int main() { int length; while(1) { IR.Set(); wait_ms(20); //check _Busy 1 &_Valid 0 ....config just wait time. length = IR.Read(); } }
Definition at line 31 of file IRM2121.h.
Constructor & Destructor Documentation
IRM2121 | ( | PinName | IRM_PIN ) |
Create a IRM2121 object connected to the specified InterruptIn pin.
- Parameters:
-
IRM_PIN InterruptIn pin to connect to
Definition at line 12 of file IRM2121.cpp.
Member Function Documentation
unsigned long Read | ( | void | ) |
void ReturnVB | ( | bool * | valid, |
bool * | busy | ||
) |
void Set | ( | void | ) |
Generated on Wed Jul 20 2022 01:27:06 by 1.7.2