TeensyNanoExoCode
Loading...
Searching...
No Matches
Battery.h
Go to the documentation of this file.
1#ifndef RCBATTERY_H
2#define RCBATTERY_H
3
4
5#include "I2CHandler.h"
6#if defined(ARDUINO_ARDUINO_NANO33BLE) | defined(ARDUINO_NANO_RP2040_CONNECT)
7
8class _Battery
9{
10 public:
11 /* Initialize any variables or peripherals */
12 virtual void init() = 0;
13 /* Collect and return the parameter of interest */
14 virtual float get_parameter() = 0;
15};
16
17class SmartBattery: public _Battery
18{
19 public:
20 void init();
21 float get_parameter();
22
23 private:
25};
26
27class RCBattery: public _Battery
28{
29 public:
30 void init();
31 float get_parameter();
32
33 private:
35 const int BusLSB = 4;
36};
37#endif
38#endif
const uint8_t len
Definition I2CHandler.h:94
const uint8_t len
Definition I2CHandler.h:72
void init()
Definition RealTimeI2C.cpp:91