6#ifndef _ARTEMIS_DEVICES_H
7#define _ARTEMIS_DEVICES_H
11#include <Adafruit_GPS.h>
12#include <Adafruit_INA219.h>
13#include <Adafruit_LIS3MDL.h>
14#include <Adafruit_LSM6DSOX.h>
15#include <Adafruit_Sensor.h>
16#include <support/configCosmosKernel.h>
71 Adafruit_LIS3MDL *magnetometer =
new Adafruit_LIS3MDL();
74 int32_t
read(uint32_t uptime);
77 bool magnetometerSetup;
142 Adafruit_LSM6DSOX *imu =
new Adafruit_LSM6DSOX();
145 int32_t
read(uint32_t uptime);
194 uint8_t satellites = 0;
198 uint8_t fixquality = 0;
212 uint16_t millisecond = 0;
232 Adafruit_GPS *gps =
new Adafruit_GPS(&Serial7);
236 int32_t
read(uint32_t uptime);
371 {
"solar_panel_1",
new Adafruit_INA219(0x40)},
372 {
"solar_panel_2",
new Adafruit_INA219(0x41)},
373 {
"solar_panel_3",
new Adafruit_INA219(0x42)},
374 {
"solar_panel_4",
new Adafruit_INA219(0x43)},
375 {
"battery_board",
new Adafruit_INA219(0x44)},
379 int32_t
read(uint32_t uptime);
421 float teensy_temperatureC = 0;
453 {
"battery_board", A6},
454 {
"solar_panel_1", A7},
455 {
"solar_panel_2", A8},
456 {
"solar_panel_3", A9},
457 {
"solar_panel_4", A17},
461 int32_t
read(uint32_t uptime);
464 bool temperatureSetup;
496 uint8_t switches[13];
The Artemis definitions header file.
#define ARTEMIS_CURRENT_SENSOR_COUNT
The number of current sensors in the satellite.
Definition artemis_defs.h:18
#define ARTEMIS_TEMP_SENSOR_COUNT
The number of temperature sensors in the satellite.
Definition artemis_defs.h:20
#define ARTEMIS_CURRENT_BEACON_1_COUNT
The number of readings that can fit in the first beacon.
Definition artemis_defs.h:16
Definitions of Artemis Beacons.
The current sensors on the satellite.
Definition artemis_devices.h:243
int32_t read(uint32_t uptime)
Reads current sensors and generates two packets on both RFM23 and Astrodev queues.
Definition artemis_devices.cpp:294
std::map< std::string, Adafruit_INA219 * > current_sensors
Mapping between current sensor string names and current sensor objects.
Definition artemis_devices.h:370
int32_t setup(void)
Sets up I2C connection to current sensors.
Definition artemis_devices.cpp:271
The satellite's Global Positioning System (GPS).
Definition artemis_devices.h:157
int32_t read(uint32_t uptime)
Reads GPS sensor and generates a packet on both RFM23 and Astrodev queues.
Definition artemis_devices.cpp:598
int32_t update(void)
Called to update the GPS.
Definition artemis_devices.cpp:554
int32_t setup(void)
Sets up serial connection to GPS sensor.
Definition artemis_devices.cpp:471
The satellite's Inertial Measurement Unit (IMU).
Definition artemis_devices.h:87
int32_t read(uint32_t uptime)
Reads IMU and generates a packet on both RFM23 and Astrodev queues.
Definition artemis_devices.cpp:206
int32_t setup(void)
Sets up I2C connection to IMU.
Definition artemis_devices.cpp:144
The satellite's magnetometer.
Definition artemis_devices.h:28
int32_t setup(void)
Sets up I2C connection to magnetometer.
Definition artemis_devices.cpp:15
int32_t read(uint32_t uptime)
Reads magnetometer and generates a packet on both RFM23 and Astrodev queues.
Definition artemis_devices.cpp:85
The switches on the PDU of the satellite.
Definition artemis_devices.h:468
The temperature sensors on the satellite.
Definition artemis_devices.h:386
int32_t setup(void)
Sets up analog connection to temperature sensors.
Definition artemis_devices.cpp:389
std::map< std::string, int > temp_sensors
Mapping between temperature sensor string names and their analog pins.
Definition artemis_devices.h:450
int32_t read(uint32_t uptime)
Reads temperature sensors and generates a packet on both RFM23 and Astrodev queues.
Definition artemis_devices.cpp:409
BeaconType
Enumeration of beacon type.
Definition artemisbeacons.h:30
The first current beacon structure.
Definition artemis_devices.h:254
The second current beacon structure.
Definition artemis_devices.h:307
The GPS beacon structure.
Definition artemis_devices.h:170
The IMU beacon structure.
Definition artemis_devices.h:100
The magnetometer beacon structure.
Definition artemis_devices.h:39
The switches beacon structure.
Definition artemis_devices.h:479
The temperature beacon structure.
Definition artemis_devices.h:398