Skip to content

NorthernWidget-Skunkworks/Okapi_Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summary

Members Descriptions
class Okapi An Arduino-compatible library for utilizing the basic and logging features of the Okapi data logger.

class Okapi

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.

DOI

Summary

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.

Members

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.

Parameters

  • 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.

Parameters

  • *Vals List of I2C addresses for external sensors

  • NumVals The 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.

Parameters

  • Header_ A header string for the data file

public int LogStr(String Val)

Write a string to the log file.

Parameters

  • Val The string to be written

public String ReadStr(uint8_t LineIndex,uint32_t DataIndex)

BSCHULZ1701: WHAT EXACTLY DOES THIS FUNCTION DO?

Parameters

  • LineIndex The desired line number

  • DataIndex The desired byte at which to start in the file

public void LED_Color(unsigned long Val)

Set the color of the LED.

Parameters

  • Val 4-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!

Parameters

  • *Update Pointer to a function in the Arduino sketch (ino); this retrieves new sensor data as a String object

  • LogInterval Number of seconds between log events

public float GetVoltage(uint8_t Pin)

Read voltage from the external 16-bit ADC.

Parameters

  • 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.

Parameters

  • Val 0 to 4095, which scales from 0 to Vbus

  • Gain WHAT? 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.

Parameters

  • Val Desired voltage value, in volts.

public void AddDataPoint(String(*)(void) Update)

Writes date/time, on-board sensors, and external string to SD.

Parameters

  • *Update External 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!

Parameters

  • State

public void I2CState(bool State)

Set the I2C state.

Parameters

  • State True or False gives On or Off

Generated by Moxygen

About

An Arduino compatible library for utilizing the basic and logging features of the Resnik data logger

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors