mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.
Dependents: HelloWorld_IKA01A1
Fork of X_NUCLEO_IKA01A1 by
TSU104 Class Reference
Class representing a TSU104 operational amplifier component. More...
#include <TSU104.h>
Inherits Windcomp, and PhotoSensor.
Public Member Functions | |
TSU104 (PinName photoSensorPin, PinName windCmpSignalPin_1, PinName windCmpSignalPin_2) | |
Constructor. | |
virtual | ~TSU104 (void) |
Destructor. | |
virtual int | init (void *init=NULL) |
Public functions inherited from the Component Class. | |
virtual int | read_id (uint8_t *id=NULL) |
obtain component ID for TSU104 perational amplifier | |
virtual unsigned int | get_signal1 (void) |
Public functions inherited from the LedDriver Class. | |
virtual unsigned int | get_signal2 (void) |
get digital signal value 2 in windows comparator configuration | |
virtual unsigned int | get_voltage (void) |
obtain the output voltage detected by photo sensor | |
Protected Attributes | |
PinName | photo_sensor_pin |
arduino pin for photosensor output voltage | |
PinName | windCmp_signal_pin_1 |
arduino pin for signal 1 of windows comparator configuration | |
PinName | windCmp_signal_pin_2 |
arduino pin for signal 1 of windows comparator configuration |
Detailed Description
Class representing a TSU104 operational amplifier component.
The window comparator configuration allows the user to compare a signal to two threshold voltages. When the signal is out of the required voltage range, the output of the operational amplifier toggles
Definition at line 85 of file TSU104.h.
Constructor & Destructor Documentation
TSU104 | ( | PinName | photoSensorPin, |
PinName | windCmpSignalPin_1, | ||
PinName | windCmpSignalPin_2 | ||
) |
Member Function Documentation
virtual unsigned int get_signal1 | ( | void | ) | [virtual] |
virtual unsigned int get_signal2 | ( | void | ) | [virtual] |
virtual unsigned int get_voltage | ( | void | ) | [virtual] |
obtain the output voltage detected by photo sensor
- Parameters:
-
pin AnalogIn pin to use for detecting the voltage
- Return values:
-
voltage detected by photo sensor
Implements PhotoSensor.
virtual int init | ( | void * | init = NULL ) |
[virtual] |
virtual int read_id | ( | uint8_t * | id = NULL ) |
[virtual] |
Field Documentation
PinName photo_sensor_pin [protected] |
PinName windCmp_signal_pin_1 [protected] |
PinName windCmp_signal_pin_2 [protected] |
Generated on Tue Jul 12 2022 17:01:49 by 1.7.2