addition varient confi values for other rak4630 variants

This commit is contained in:
Justin E. Mann 2024-12-02 17:30:46 -07:00
parent 4c467270c0
commit e2f0226e9f
7 changed files with 119 additions and 16 deletions

View File

@ -290,6 +290,8 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
// - registry address to interrogate is 0x02, // - registry address to interrogate is 0x02,
// - expected value is 0x20 // - expected value is 0x20
// Additional info about registry values for the RAK12035 can be found here [https://github.com/RAKWireless/RAK12035_SoilMoisture/blob/main/RAK12035_SoilMoisture.h] // Additional info about registry values for the RAK12035 can be found here [https://github.com/RAKWireless/RAK12035_SoilMoisture/blob/main/RAK12035_SoilMoisture.h]
#ifdef CAN_HOST_RAK12035VBSOIL
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x02), 1); // get the default address for the device (stored in registry here [0x02]).. should come back as 0x20 registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x02), 1); // get the default address for the device (stored in registry here [0x02]).. should come back as 0x20
LOG_INFO("Checking for RAK12035VB Soil Sensor with registry address 0x02..."); LOG_INFO("Checking for RAK12035VB Soil Sensor with registry address 0x02...");
if (registerValue == 0x20) { if (registerValue == 0x20) {
@ -301,6 +303,11 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
type = TCA9535; type = TCA9535;
LOG_INFO("TCA9535 I2C expander found\n"); LOG_INFO("TCA9535 I2C expander found\n");
} }
#else
LOG_INFO("Found registry value 0x%x", registerValue);
type = TCA9535;
LOG_INFO("TCA9535 I2C expander found\n");
#endif
break; break;
case MCP9808_ADDR: case MCP9808_ADDR:

View File

@ -80,7 +80,7 @@ bool RAK12035VBSensor::getMetrics(meshtastic_Telemetry *measurement)
success = sensor.get_sensor_temperature(&temp); success = sensor.get_sensor_temperature(&temp);
delay(500); delay(500);
if(success = false){ if(success == false){
LOG_ERROR("Failed to read sensor data"); LOG_ERROR("Failed to read sensor data");
return false; return false;
} }

View File

@ -135,6 +135,9 @@ static const uint8_t SCK = PIN_SPI_SCK;
// #define USE_EINK // #define USE_EINK
// RAK12035VBSOIL Sensor
#define CAN_HOST_RAK12035VBSOIL (1)
// RAKRGB // RAKRGB
#define HAS_NCP5623 #define HAS_NCP5623
@ -161,23 +164,23 @@ static const uint8_t SCK = PIN_SPI_SCK;
/* /*
* WisBlock Base GPIO definitions * WisBlock Base GPIO definitions
*/ */
#define WB_IO1 (17) // SLOT_A SLOT_B // #define WB_IO1 (17) // SLOT_A SLOT_B
#define WB_IO2 (34) // SLOT_A SLOT_B #define WB_IO2 (34) // SLOT_A SLOT_B
#define WB_IO3 (21) // SLOT_C // #define WB_IO3 (21) // SLOT_C
#define WB_IO4 (4) // SLOT_C #define WB_IO4 (4) // SLOT_C
#define WB_IO5 (9) // SLOT_D #define WB_IO5 (9) // SLOT_D
#define WB_IO6 (10) // SLOT_D // #define WB_IO6 (10) // SLOT_D
#define WB_SW1 (33) // IO_SLOT // #define WB_SW1 (33) // IO_SLOT
#define WB_A0 (5) // IO_SLOT // #define WB_A0 (5) // IO_SLOT
#define WB_A1 (31) // IO_SLOT // #define WB_A1 (31) // IO_SLOT
#define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT // #define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT
#define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT // #define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT
#define WB_I2C2_SDA (24) // IO_SLOT // #define WB_I2C2_SDA (24) // IO_SLOT
#define WB_I2C2_SCL (25) // IO_SLOT // #define WB_I2C2_SCL (25) // IO_SLOT
#define WB_SPI_CS (26) // IO_SLOT // #define WB_SPI_CS (26) // IO_SLOT
#define WB_SPI_CLK (3) // IO_SLOT // #define WB_SPI_CLK (3) // IO_SLOT
#define WB_SPI_MISO (29) // IO_SLOT // #define WB_SPI_MISO (29) // IO_SLOT
#define WB_SPI_MOSI (30) // IO_SLOT // #define WB_SPI_MOSI (30) // IO_SLOT
/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports /* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports
RAK5005-O <-> nRF52840 RAK5005-O <-> nRF52840

View File

@ -135,6 +135,9 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define USE_EINK #define USE_EINK
// RAK12035VBSOIL Sensor
#define CAN_HOST_RAK12035VBSOIL (1)
// RAKRGB // RAKRGB
#define HAS_NCP5623 #define HAS_NCP5623
@ -158,6 +161,27 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define EXTERNAL_FLASH_DEVICES IS25LP080D #define EXTERNAL_FLASH_DEVICES IS25LP080D
#define EXTERNAL_FLASH_USE_QSPI #define EXTERNAL_FLASH_USE_QSPI
/*
* WisBlock Base GPIO definitions
*/
// #define WB_IO1 (17) // SLOT_A SLOT_B
#define WB_IO2 (34) // SLOT_A SLOT_B
// #define WB_IO3 (21) // SLOT_C
#define WB_IO4 (4) // SLOT_C
#define WB_IO5 (9) // SLOT_D
// #define WB_IO6 (10) // SLOT_D
// #define WB_SW1 (33) // IO_SLOT
// #define WB_A0 (5) // IO_SLOT
// #define WB_A1 (31) // IO_SLOT
// #define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT
// #define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT
// #define WB_I2C2_SDA (24) // IO_SLOT
// #define WB_I2C2_SCL (25) // IO_SLOT
// #define WB_SPI_CS (26) // IO_SLOT
// #define WB_SPI_CLK (3) // IO_SLOT
// #define WB_SPI_MISO (29) // IO_SLOT
// #define WB_SPI_MOSI (30) // IO_SLOT
/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports /* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports
RAK5005-O <-> nRF52840 RAK5005-O <-> nRF52840
IO1 <-> P0.17 (Arduino GPIO number 17) IO1 <-> P0.17 (Arduino GPIO number 17)

View File

@ -119,6 +119,9 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define PIN_EINK_SCLK (0 + 14) // SCL #define PIN_EINK_SCLK (0 + 14) // SCL
#define PIN_EINK_MOSI (0 + 13) // SDA #define PIN_EINK_MOSI (0 + 13) // SDA
// RAK12035VBSOIL Sensor
#define CAN_HOST_RAK12035VBSOIL (1)
// RAKRGB // RAKRGB
#define HAS_NCP5623 #define HAS_NCP5623
@ -130,6 +133,26 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define PIN_WIRE_SDA (13) #define PIN_WIRE_SDA (13)
#define PIN_WIRE_SCL (14) #define PIN_WIRE_SCL (14)
/*
* WisBlock Base GPIO definitions
*/
// #define WB_IO1 (17) // SLOT_A SLOT_B
#define WB_IO2 (34) // SLOT_A SLOT_B
// #define WB_IO3 (21) // SLOT_C
#define WB_IO4 (4) // SLOT_C
#define WB_IO5 (9) // SLOT_D
// #define WB_IO6 (10) // SLOT_D
// #define WB_SW1 (33) // IO_SLOT
// #define WB_A0 (5) // IO_SLOT
// #define WB_A1 (31) // IO_SLOT
// #define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT
// #define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT
// #define WB_I2C2_SDA (24) // IO_SLOT
// #define WB_I2C2_SCL (25) // IO_SLOT
// #define WB_SPI_CS (26) // IO_SLOT
// #define WB_SPI_CLK (3) // IO_SLOT
// #define WB_SPI_MISO (29) // IO_SLOT
// #define WB_SPI_MOSI (30) // IO_SLOT
/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports /* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports
RAK5005-O <-> nRF52840 RAK5005-O <-> nRF52840
IO1 <-> P0.17 (Arduino GPIO number 17) IO1 <-> P0.17 (Arduino GPIO number 17)

View File

@ -135,6 +135,9 @@ static const uint8_t SCK = PIN_SPI_SCK;
// #define USE_EINK // #define USE_EINK
// RAK12035VBSOIL Sensor
#define CAN_HOST_RAK12035VBSOIL (1)
// RAKRGB // RAKRGB
#define HAS_NCP5623 #define HAS_NCP5623
@ -158,6 +161,26 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define EXTERNAL_FLASH_DEVICES IS25LP080D #define EXTERNAL_FLASH_DEVICES IS25LP080D
#define EXTERNAL_FLASH_USE_QSPI #define EXTERNAL_FLASH_USE_QSPI
/*
* WisBlock Base GPIO definitions
*/
// #define WB_IO1 (17) // SLOT_A SLOT_B
#define WB_IO2 (34) // SLOT_A SLOT_B
// #define WB_IO3 (21) // SLOT_C
#define WB_IO4 (4) // SLOT_C
#define WB_IO5 (9) // SLOT_D
// #define WB_IO6 (10) // SLOT_D
// #define WB_SW1 (33) // IO_SLOT
// #define WB_A0 (5) // IO_SLOT
// #define WB_A1 (31) // IO_SLOT
// #define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT
// #define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT
// #define WB_I2C2_SDA (24) // IO_SLOT
// #define WB_I2C2_SCL (25) // IO_SLOT
// #define WB_SPI_CS (26) // IO_SLOT
// #define WB_SPI_CLK (3) // IO_SLOT
// #define WB_SPI_MISO (29) // IO_SLOT
// #define WB_SPI_MOSI (30) // IO_SLOT
/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports /* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports
RAK5005-O <-> nRF52840 RAK5005-O <-> nRF52840
IO1 <-> P0.17 (Arduino GPIO number 17) IO1 <-> P0.17 (Arduino GPIO number 17)

View File

@ -133,7 +133,10 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define PIN_EINK_SCLK (0 + 3) #define PIN_EINK_SCLK (0 + 3)
#define PIN_EINK_MOSI (0 + 30) // also called SDI #define PIN_EINK_MOSI (0 + 30) // also called SDI
// #define USE_EINK // #def
// RAK12035VBSOIL Sensor
#define CAN_HOST_RAK12035VBSOIL (1)
// RAKRGB // RAKRGB
#define HAS_NCP5623 #define HAS_NCP5623
@ -158,6 +161,26 @@ static const uint8_t SCK = PIN_SPI_SCK;
#define EXTERNAL_FLASH_DEVICES IS25LP080D #define EXTERNAL_FLASH_DEVICES IS25LP080D
#define EXTERNAL_FLASH_USE_QSPI #define EXTERNAL_FLASH_USE_QSPI
/*
* WisBlock Base GPIO definitions
*/
// #define WB_IO1 (17) // SLOT_A SLOT_B
#define WB_IO2 (34) // SLOT_A SLOT_B
// #define WB_IO3 (21) // SLOT_C
#define WB_IO4 (4) // SLOT_C
#define WB_IO5 (9) // SLOT_D
// #define WB_IO6 (10) // SLOT_D
// #define WB_SW1 (33) // IO_SLOT
// #define WB_A0 (5) // IO_SLOT
// #define WB_A1 (31) // IO_SLOT
// #define WB_I2C1_SDA (13) // SENSOR_SLOT IO_SLOT
// #define WB_I2C1_SCL (14) // SENSOR_SLOT IO_SLOT
// #define WB_I2C2_SDA (24) // IO_SLOT
// #define WB_I2C2_SCL (25) // IO_SLOT
// #define WB_SPI_CS (26) // IO_SLOT
// #define WB_SPI_CLK (3) // IO_SLOT
// #define WB_SPI_MISO (29) // IO_SLOT
// #define WB_SPI_MOSI (30) // IO_SLOT
/* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports /* @note RAK5005-O GPIO mapping to RAK4631 GPIO ports
RAK5005-O <-> nRF52840 RAK5005-O <-> nRF52840
IO1 <-> P0.17 (Arduino GPIO number 17) IO1 <-> P0.17 (Arduino GPIO number 17)