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.
Dependents: PAW_Sensor_HelloWorld
PAW Class Reference
PAW_Sensor Library. More...
#include <paw.h>
Public Member Functions | |
| PAW (PinName led_1, PinName led_2, PinName photo_1, PinName photo_2) | |
| Create a PAW Sensor instance. | |
| paw_value | get_value () |
| Get values of PAW Sensor. | |
| unsigned char | process_paw () |
| Processing of Paw sensor. | |
| bool | get_state () |
| Get current processing-state. | |
| void | print (Serial *pc, unsigned char id) |
| Send values of PAW Sensor through serial-communication. | |
Detailed Description
PAW_Sensor Library.
Example:
#include "mbed.h" #include "paw.h" Serial pc( USBTX, USBRX ); const unsigned long baudrate = 115200; // paw( LED1, LED2, PHOTO1, PHOTO2 ) PAW paw( p8, p9, p16, p17 ); paw_value g_value; Ticker run; void run_paw_sensor() { if( paw.process_paw() == STATE_1 ) { paw.print( &pc, 0 ); } } int main() { // Initializing Serial Communication pc.baud( baudrate ); pc.format( 8, Serial::None, 1 ); run.attach_us(&run_paw_sensor, 500); while(1); }
Definition at line 72 of file paw.h.
Constructor & Destructor Documentation
| PAW | ( | PinName | led_1, |
| PinName | led_2, | ||
| PinName | photo_1, | ||
| PinName | photo_2 | ||
| ) |
Member Function Documentation
| bool get_state | ( | ) |
| paw_value get_value | ( | ) |
| void print | ( | Serial * | pc, |
| unsigned char | id | ||
| ) |
Generated on Thu Jul 14 2022 00:11:32 by
1.7.2
PAW Sensor