-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from jgauchia/v.0.1.8_dev
V.0.1.8 dev - IMU
- Loading branch information
Showing
109 changed files
with
6,206 additions
and
5,747 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* @file hal.hpp | ||
* @author Jordi Gauchía (jgauchia@gmx.es) | ||
* @brief Pin definitions | ||
* @version 0.1.8 | ||
* @date 2024-04 | ||
*/ | ||
|
||
#ifndef HAL_HPP | ||
#define HAL_HPP | ||
|
||
#ifdef CUSTOMBOARD | ||
/** | ||
* @brief GPS pin definition | ||
* | ||
*/ | ||
extern const uint8_t GPS_TX = 25; | ||
extern const uint8_t GPS_RX = 26; | ||
|
||
/** | ||
* @brief SD pin definition | ||
* | ||
*/ | ||
extern const uint8_t SD_CS = 4; | ||
extern const uint8_t SD_MISO = 19; | ||
extern const uint8_t SD_MOSI = 23; | ||
extern const uint8_t SD_CLK = 12; | ||
#endif | ||
|
||
#ifdef MAKERF_ESP32S3 // TODO: we need find the right pins for this board | ||
/** | ||
* @brief GPS pin definition | ||
* | ||
*/ | ||
extern const uint8_t GPS_TX = 17; | ||
extern const uint8_t GPS_RX = 18; | ||
|
||
#define LCD_CS 37 | ||
#define LCD_BLK 45 | ||
|
||
#define I2C_SDA_PIN 38 | ||
#define I2C_SCL_PIN 39 | ||
|
||
extern const uint8_t SD_CS = 1; | ||
extern const uint8_t SD_MISO = 41; | ||
extern const uint8_t SD_MOSI = 2; | ||
extern const uint8_t SD_CLK = 42; | ||
#endif | ||
|
||
/** | ||
* @brief Battery monitor pin | ||
* | ||
*/ | ||
#define ADC_BATT_PIN 34 | ||
|
||
/** | ||
* @brief BME280 Address | ||
* | ||
*/ | ||
#define BME_ADDRESS 0x76 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* @file battery.hpp | ||
* @author Jordi Gauchía (jgauchia@gmx.es) | ||
* @brief Battery monitor definition and functions | ||
* @version 0.1.8 | ||
* @date 2024-04 | ||
*/ | ||
|
||
#ifndef BATTERY_HPP | ||
#define BATTERY_HPP | ||
|
||
#include <Arduino.h> | ||
#include <driver/adc.h> | ||
#include <esp_adc_cal.h> | ||
|
||
static esp_adc_cal_characteristics_t characteristics; | ||
#define V_REF 3.9 // ADC reference voltage | ||
|
||
static float batteryMax = 4.20; // 4.2; // maximum voltage of battery | ||
static float batteryMin = 3.40; // 3.6; // minimum voltage of battery before shutdown | ||
|
||
void initADC(); | ||
float batteryRead(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @file bme.cpp | ||
* @author Jordi Gauchía (jgauchia@gmx.es) | ||
* @brief BME280 Sensor functions | ||
* @version 0.1.8 | ||
* @date 2024-04 | ||
*/ | ||
|
||
#include "bme.hpp" | ||
|
||
Adafruit_BME280 bme = Adafruit_BME280(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* @file bme.hpp | ||
* @author Jordi Gauchía (jgauchia@gmx.es) | ||
* @brief BME280 Sensor functions | ||
* @version 0.1.8 | ||
* @date 2024-04 | ||
*/ | ||
|
||
#ifndef BME_HPP | ||
#define BME_HPP | ||
|
||
#include <Adafruit_Sensor.h> | ||
#include <Adafruit_BME280.h> | ||
|
||
extern Adafruit_BME280 bme; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.