Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otSpectrometerShield Class Reference
[Spectrometer 350-850 nm - With white pulsed LED and blue (405nm) laser.Spectrometer 350-850 nm - With white pulsed LED and blue (405nm) laser.]

Class to manage C12880 Hamamatsu spectrometer, with white LED, Blue Laser and two photodiode.

#include <otSpectrometerShield.h>

Inheritance diagram for otSpectrometerShield:

otMCP23017

Public Types

typedef otSpectrometerShield::LightSource LightSource
enum  { P_CK = 0x1000, P_ST = 0x2000, SPEC_CHANNELS = 288 }
enum  LightSource { SRC_LED = 0x4000, SRC_LASER = 0x8000, SRC_OFF = 0 }

Public Member Functions

 otSpectrometerShield ()
void init (otADS868x *adc, U8 addressIndex=0)
void board (bool ena=true)
void led (bool ena)
void laser (bool ena)
void setLightSource (LightSource src)
void grabSpectral (U16 *ptr, U16 num=1)
void grabPhotoDiode (U16 *ptr, U32 len, U32 delayUs)

Member Typedef Documentation

typedef otSpectrometerShield::LightSource otSpectrometerShield.LightSource
 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
P_CK  Internal use.
P_ST  Internal use.
SPEC_CHANNELS  Number of spectrometer pixel.

enum otSpectrometerShield::LightSource
 

Enumeration values:
SRC_LED  White LED.
SRC_LASER  Laser 405nm (or different).
SRC_OFF  Light off.


Constructor & Destructor Documentation

otSpectrometerShield.otSpectrometerShield  ) 
 

Create the class


Member Function Documentation

void otSpectrometerShield.board bool  ena = true  ) 
 

Enable or disable the shield

Parameters:
ena True if shield resources are enabled

void otSpectrometerShield.grabPhotoDiode U16 ptr,
U32  len,
U32  delayUs
 

Grab photodiode data

Parameters:
ptr Pointer to storage data
len Number of samples
delayUs Interval delay, 0 to n

void otSpectrometerShield.grabSpectral U16 ptr,
U16  num = 1
 

Grab one or more spectral

Parameters:
ptr Pointer to storage spectral data
num Number of spectral to grab

void otSpectrometerShield.init otADS868x adc,
U8  addressIndex = 0
 

Init the library

Parameters:
adc Pointer to ADC class
addressIndex Shield address, 0 to 7

void otSpectrometerShield.laser bool  ena  ) 
 

Turn on/off the laser

Parameters:
ena True for laser on

void otSpectrometerShield.led bool  ena  ) 
 

Turn on/off the LED

Parameters:
ena True for LED on

void otSpectrometerShield.setLightSource LightSource  src  ) 
 

Select the light source

Parameters:
src Light source selection, see LightSource


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-25 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0