Artemis Teensy Flight Software
The software on the Teensy in the Artemis cubesat.
Artemis::Devices::CurrentSensors Class Reference

The current sensors on the satellite. More...

#include <artemis_devices.h>

Classes

struct  currentbeacon1
 The first current beacon structure. More...
 
struct  currentbeacon2
 The second current beacon structure. More...
 

Public Member Functions

bool setup (void)
 Sets up the satellite's current sensors. More...
 
void read (uint32_t uptime)
 Reads the satellite's current sensors. More...
 

Public Attributes

std::map< std::string, Adafruit_INA219 * > current_sensors
 Instantiation and mapping of core sensor objects. More...
 

Detailed Description

The current sensors on the satellite.

Member Function Documentation

◆ read()

void Artemis::Devices::CurrentSensors::read ( uint32_t  uptime)

Reads the satellite's current sensors.

This method of the CurrentSensors class reads the current sensor values, stores them in two beacons (currentbeacon1 and currentbeacon2), and transmits those beacons to the ground.

Parameters
uptimeThe time, in milliseconds, since the Teensy has been powered on.

◆ setup()

bool Artemis::Devices::CurrentSensors::setup ( void  )

Sets up the satellite's current sensors.

This method of the CurrentSensors class sets up the I2C connection to the satellite's current sensors.

Todo:
Go through library and see what we need to configure and calibrate
Returns
true All current sensors in current_sensors have been connected to over I2C.
false At least one current sensor in current_sensors failed to initialize over I2C.

Member Data Documentation

◆ current_sensors

std::map<std::string, Adafruit_INA219 *> Artemis::Devices::CurrentSensors::current_sensors
Initial value:
= {
{"solar_panel_1", new Adafruit_INA219(0x40)},
{"solar_panel_2", new Adafruit_INA219(0x41)},
{"solar_panel_3", new Adafruit_INA219(0x42)},
{"solar_panel_4", new Adafruit_INA219(0x43)},
{"battery_board", new Adafruit_INA219(0x44)},
}

Instantiation and mapping of core sensor objects.

The CurrentSensors class is a wrapper around the [Adafruit INA219 ](https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout) current sensor object.


The documentation for this class was generated from the following files: