Fix missing Wire.h for Rev1
This commit is contained in:
parent
359183da20
commit
27dc8c2cd0
@ -82,16 +82,21 @@ void ttn_register(void (*callback)(uint8_t message));
|
||||
// General
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#define BUTTON_PIN 39
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
#define LED_PIN 14
|
||||
|
||||
#if defined(T_BEAM_V07)
|
||||
#define BUTTON_PIN 39
|
||||
#elif defined(T_BEAM_V10)
|
||||
#define BUTTON_PIN 38
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// OLED
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#define OLED_ADDRESS 0x3C
|
||||
#define OLED_SDA 21
|
||||
#define OLED_SCL 22
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// GPS
|
||||
@ -123,11 +128,10 @@ void ttn_register(void (*callback)(uint8_t message));
|
||||
#define DIO2_GPIO 32
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Rev1-specific options
|
||||
// AXP192 (Rev1-specific options)
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
#ifdef T_BEAM_V10
|
||||
#define AXP192_SLAVE_ADDRESS 0x34
|
||||
#define GPS_POWER_CTRL_CH 3
|
||||
#define LORA_POWER_CTRL_CH 2
|
||||
#define PMU_IRQ 35
|
||||
#endif
|
||||
|
@ -23,10 +23,11 @@
|
||||
|
||||
#include "configuration.h"
|
||||
#include "rom/rtc.h"
|
||||
#include <TinyGPS++.h>
|
||||
#include <Wire.h>
|
||||
|
||||
#ifdef T_BEAM_V10
|
||||
#include "axp20x.h"
|
||||
#define AXP192_SLAVE_ADDRESS 0x34
|
||||
AXP20X_Class axp;
|
||||
bool axp192_found = false;
|
||||
bool pmu_irq = false;
|
||||
@ -35,10 +36,6 @@ String baChStatus = "No charging";
|
||||
|
||||
// Message counter, stored in RTC memory, survives deep sleep
|
||||
RTC_DATA_ATTR uint32_t count = 0;
|
||||
// -----------------------------------------------------------------------------
|
||||
// Submodules
|
||||
// -----------------------------------------------------------------------------
|
||||
#include <TinyGPS++.h>
|
||||
|
||||
#if defined(PAYLOAD_USE_FULL)
|
||||
// includes number of satellites and accuracy
|
||||
@ -144,7 +141,8 @@ void setup() {
|
||||
#endif
|
||||
|
||||
#ifdef T_BEAM_V10
|
||||
axp192_found = 1;
|
||||
Wire.begin(I2C_SDA, I2C_SCL);
|
||||
axp192_found = true;
|
||||
if (axp192_found) {
|
||||
if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS)) {
|
||||
Serial.println("AXP192 Begin PASS");
|
||||
|
@ -93,7 +93,7 @@ void screen_update() {
|
||||
|
||||
void screen_setup() {
|
||||
// Display instance
|
||||
display = new SSD1306Wire(OLED_ADDRESS, OLED_SDA, OLED_SCL);
|
||||
display = new SSD1306Wire(OLED_ADDRESS, I2C_SDA, I2C_SCL);
|
||||
display->init();
|
||||
display->flipScreenVertically();
|
||||
display->setFont(Custom_ArialMT_Plain_10);
|
||||
|
Loading…
Reference in New Issue
Block a user