| Members | Descriptions |
|---|---|
class Okapi |
An Arduino-compatible library for utilizing the basic and logging features of the Okapi data logger. |
An Arduino-compatible library for utilizing the basic and logging features of the Okapi data logger.
Data-logger management. Basic operations, power management, on-board sensing, and links to external devices.
| Members | Descriptions |
|---|---|
public int SD_CS |
SD card chip select Pin 4 |
public uint8_t BuiltInLED |
Pin controlling on/off state of RGB LED Pin 20 |
public uint8_t RedLED |
Pin controlling red intensity of RGB LED Pin 13 |
public uint8_t GreenLED |
Pin controlling green intensity of RGB LED Pin 15 |
public uint8_t BlueLED |
Pin controlling blue intensity of RGB LED Pin 14 |
public uint8_t SD_CD |
Chip-detect pin for the SD card Pin 1 |
public uint8_t I2C_SW |
Switch to enable/disable I2C Pin 21 |
public uint8_t RTCInt |
Interrupt from RTC Pin 10DIFFERENT IN CPP!!!! |
public uint8_t LogInt |
Interrupt from Log button Pin 2DIFFERENT IN CPP!!!! |
public uint8_t TX |
USART Transmit. |
public uint8_t RX |
USART Receive. |
public uint8_t C0 |
BSCHULZ1701: WHAT ARE THESE?? |
public uint8_t C1 |
BSCHULZ1701: WHAT ARE THESE?? |
public uint8_t Sw_Bus_Prime |
Primary bus switch pin (BSCHULZ1701: is this in addition to the physical switch?) |
public uint8_t Sw_Bus_Sec |
Secondary bus switch pin (BSCHULZ1701: is this in addition to the physical switch?) |
public uint8_t PG_3v3_Core |
IO Exp PORT B (BSCHULZ1701: what is this in plain English / purpose?) |
public uint8_t FeatherEN |
IO Exp PORT B (BSCHULZ1701: turn Feather on if True, I guess?) |
public uint8_t D0 |
GPIO pin D0 Arduino Pin 12 |
public uint8_t D1 |
GPIO pin D1 Arduino Pin 25 |
public uint8_t D2 |
GPIO pin D2 Arduino Pin 3 |
public uint8_t D3 |
GPIO pin D3 Arduino Pin 26 |
public uint8_t ADC_Sense_SW |
Switch the Analog-Digital Converter on (true) or off (false) Pin 0 |
public uint8_t FeatherRTS |
Feather pin: should this be public or private? |
public uint8_t FeatherCTS |
Feather pin: should this be public or private? |
public uint8_t FeatherGPIO |
Feather pin: should this be public or private? |
public uint8_t CS_Ext |
Feather pin: should this be public or private? |
public uint8_t GlobalInt |
WHAT IS THIS? |
public const String LibVersion |
Okapi data logger library version. |
public Okapi(board Model_,build Specs_) |
Instantiate the Okapi data-logger class. |
public int begin(uint8_t * Vals,uint8_t NumVals,String Header_) |
Begin with a list of attached I2C devices. |
public int begin(String Header_) |
Begin by passing a header string; default empty. |
public int LogStr(String Val) |
Write a string to the log file. |
public String ReadStr(uint8_t LineIndex,uint32_t DataIndex) |
BSCHULZ1701: WHAT EXACTLY DOES THIS FUNCTION DO? |
public void LED_Color(unsigned long Val) |
Set the color of the LED. |
public void Run(String(*)(void) Update,unsigned long LogInterval) |
Main function that loops infinititely during runtime BSCHULZ1701: I changed *f to *Update to match the CPP. Hope that does not break anything! |
public float GetVoltage(uint8_t Pin) |
Read voltage from the external 16-bit ADC. |
public uint8_t SetVoltageRaw(uint16_t Val,bool Gain) |
Set voltage on the 12-bit digital-to-analog converter. |
public uint8_t SetVoltage(float Val) |
Set voltage on the 12-bit digital-to-analog converter. |
public void AddDataPoint(String(*)(void) Update) |
Writes date/time, on-board sensors, and external string to SD. |
public String GetOnBoardVals() |
Obtain date/time, P/T/RH, temperatures, and voltages from board. |
public void InitLogFile() |
Create a new log file, following serial numbering. |
public uint8_t PowerAuto() |
Determine which input has power and set up power path from that. |
public void PowerAux(uint8_t State) |
Power from Main, backup, or off BSCHULZ1701: I am not sure what this does! |
public void I2CState(bool State) |
Set the I2C state. |
public int SD_CS
SD card chip select Pin 4
public uint8_t BuiltInLED
Pin controlling on/off state of RGB LED Pin 20
public uint8_t RedLED
Pin controlling red intensity of RGB LED Pin 13
public uint8_t GreenLED
Pin controlling green intensity of RGB LED Pin 15
public uint8_t BlueLED
Pin controlling blue intensity of RGB LED Pin 14
public uint8_t SD_CD
Chip-detect pin for the SD card Pin 1
public uint8_t I2C_SW
Switch to enable/disable I2C Pin 21
public uint8_t RTCInt
Interrupt from RTC Pin 10DIFFERENT IN CPP!!!!
public uint8_t LogInt
Interrupt from Log button Pin 2DIFFERENT IN CPP!!!!
public uint8_t TX
USART Transmit.
public uint8_t RX
USART Receive.
public uint8_t C0
BSCHULZ1701: WHAT ARE THESE??
public uint8_t C1
BSCHULZ1701: WHAT ARE THESE??
public uint8_t Sw_Bus_Prime
Primary bus switch pin (BSCHULZ1701: is this in addition to the physical switch?)
public uint8_t Sw_Bus_Sec
Secondary bus switch pin (BSCHULZ1701: is this in addition to the physical switch?)
public uint8_t PG_3v3_Core
IO Exp PORT B (BSCHULZ1701: what is this in plain English / purpose?)
public uint8_t FeatherEN
IO Exp PORT B (BSCHULZ1701: turn Feather on if True, I guess?)
public uint8_t D0
GPIO pin D0 Arduino Pin 12
public uint8_t D1
GPIO pin D1 Arduino Pin 25
public uint8_t D2
GPIO pin D2 Arduino Pin 3
public uint8_t D3
GPIO pin D3 Arduino Pin 26
public uint8_t ADC_Sense_SW
Switch the Analog-Digital Converter on (true) or off (false) Pin 0
public uint8_t FeatherRTS
Feather pin: should this be public or private?
public uint8_t FeatherCTS
Feather pin: should this be public or private?
public uint8_t FeatherGPIO
Feather pin: should this be public or private?
public uint8_t CS_Ext
Feather pin: should this be public or private?
public uint8_t GlobalInt
WHAT IS THIS?
public const String LibVersion
Okapi data logger library version.
public Okapi(board Model_,build Specs_)
Instantiate the Okapi data-logger class.
-
Model_Not currently used for Okapi -
Specs_Defines the number of on-board I2C device addresses. Build_A: DEFAULT 6 on-board I2C devices. Build_B: 0 on-board I2C devices.
public int begin(uint8_t * Vals,uint8_t NumVals,String Header_)
Begin with a list of attached I2C devices.
-
*ValsList of I2C addresses for external sensors -
NumValsThe length of the *Vals list -
Header_A header string for the data file
public int begin(String Header_)
Begin by passing a header string; default empty.
Header_A header string for the data file
public int LogStr(String Val)
Write a string to the log file.
ValThe string to be written
public String ReadStr(uint8_t LineIndex,uint32_t DataIndex)
BSCHULZ1701: WHAT EXACTLY DOES THIS FUNCTION DO?
-
LineIndexThe desired line number -
DataIndexThe desired byte at which to start in the file
public void LED_Color(unsigned long Val)
Set the color of the LED.
Val4-byte (R, G, B, alpha) color
public void Run(String(*)(void) Update,unsigned long LogInterval)
Main function that loops infinititely during runtime BSCHULZ1701: I changed *f to *Update to match the CPP. Hope that does not break anything!
-
*UpdatePointer to a function in the Arduino sketch (ino); this retrieves new sensor data as a String object -
LogIntervalNumber of seconds between log events
public float GetVoltage(uint8_t Pin)
Read voltage from the external 16-bit ADC.
Pin(range 0-3) which pin to read?
public uint8_t SetVoltageRaw(uint16_t Val,bool Gain)
Set voltage on the 12-bit digital-to-analog converter.
-
Val0 to 4095, which scales from 0 to Vbus -
GainWHAT? WHY BOOL?
BSCHULZ1701: WHY IS THE GAIN A BOOLEAN? AND IS THIS FROM 0 TO VBUS? AND SHOULD THIS BE A PRIVATE UTILITY FUNCTION?
public uint8_t SetVoltage(float Val)
Set voltage on the 12-bit digital-to-analog converter.
ValDesired voltage value, in volts.
public void AddDataPoint(String(*)(void) Update)
Writes date/time, on-board sensors, and external string to SD.
*UpdateExternal update function from Arduino sketch
public String GetOnBoardVals()
Obtain date/time, P/T/RH, temperatures, and voltages from board.
public void InitLogFile()
Create a new log file, following serial numbering.
public uint8_t PowerAuto()
Determine which input has power and set up power path from that.
public void PowerAux(uint8_t State)
Power from Main, backup, or off BSCHULZ1701: I am not sure what this does!
State
public void I2CState(bool State)
Set the I2C state.
StateTrue or False gives On or Off
Generated by Moxygen