Pin out for lorawan and bme280 example with cubecel

in this code what is the pin out for CubeCell 1 / 2AA Node

I have tried with pins 36 and 37 -39 and 40 for scl and sda and the sensor does not send information

#include <LoRaWan_APP.h>
#include <Arduino.h>
#include <Seeed_BME280.h>
#include <Wire.h>

/* OTAA para*/
uint8_t devEui[] = { 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX }; //#Insert you Development EUI here as indivudal bytes replacing each XX pair
uint8_t appEui[] = { 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX }; //#Insert you Application EUI here as indivudal bytes replacing each XX pair
uint8_t appKey[] = { 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX, 0xXX }; //#Insert you Application Key here as indivudal bytes replacing each XX pair

bool ENABLE_SERIAL = true; // enable serial debug output here if required
uint32_t appTxDutyCycle = 100000; // the frequency of readings, in milliseconds(set 100s)

uint16_t userChannelsMask[6]={ 0x00FF,0x0000,0x0000,0x0000,0x0000,0x0000 };
LoRaMacRegion_t loraWanRegion = ACTIVE_REGION;
DeviceClass_t loraWanClass = LORAWAN_CLASS;
bool overTheAirActivation = LORAWAN_NETMODE;
bool loraWanAdr = LORAWAN_ADR;
bool keepNet = LORAWAN_NET_RESERVE;
bool isTxConfirmed = LORAWAN_UPLINKMODE;
uint8_t appPort = 2;
uint8_t confirmedNbTrials = 4;

int temperature, humidity, batteryVoltage, batteryLevel;
long pressure;

BME280 bme280;

static void prepareTxFrame( uint8_t port )
{
// This enables the output to power the sensor
pinMode(Vext, OUTPUT);
digitalWrite(Vext, LOW);
delay(500);

if(!bme280.init()){
if(ENABLE_SERIAL){
Serial.println(“Device error!”);
}
}

// This delay is required to allow the sensor time to init
delay(500);

temperature = bme280.getTemperature() * 100;
humidity = bme280.getHumidity();
pressure = bme280.getPressure();

Wire.end();

// Turn the power to the sensor off again
digitalWrite(Vext, HIGH);

batteryVoltage = getBatteryVoltage();
batteryLevel = (BoardGetBatteryLevel() / 254) * 100;

appDataSize = 12;
appData[0] = highByte(temperature);
appData[1] = lowByte(temperature);

appData[2] = highByte(humidity);
appData[3] = lowByte(humidity);

appData[4] = (byte) ((pressure & 0xFF000000) >> 24 );
appData[5] = (byte) ((pressure & 0x00FF0000) >> 16 );
appData[6] = (byte) ((pressure & 0x0000FF00) >> 8 );
appData[7] = (byte) ((pressure & 0X000000FF) );

appData[8] = highByte(batteryVoltage);
appData[9] = lowByte(batteryVoltage);

appData[10] = highByte(batteryLevel);
appData[11] = lowByte(batteryLevel);

if(ENABLE_SERIAL){
Serial.print("Temperature: ");
Serial.print(temperature / 100);
Serial.print(“C, Humidity: “);
Serial.print(humidity);
Serial.print(”%, Pressure: “);
Serial.print(pressure / 100);
Serial.print(” mbar, Battery Voltage: “);
Serial.print(batteryVoltage);
Serial.print(” mV, Battery Level: “);
Serial.print(batteryLevel);
Serial.println(” %”);
}
}

void setup()
{

boardInitMcu();
if(ENABLE_SERIAL){
Serial.begin(115200);
}
deviceState = DEVICE_STATE_INIT;
LoRaWAN.ifskipjoin();

}

void loop()
{
switch( deviceState )
{
case DEVICE_STATE_INIT:
{
printDevParam();
LoRaWAN.init(loraWanClass,loraWanRegion);
deviceState = DEVICE_STATE_JOIN;
break;
}
case DEVICE_STATE_JOIN:
{
LoRaWAN.join();
break;
}
case DEVICE_STATE_SEND:
{
prepareTxFrame( appPort );
LoRaWAN.send();
deviceState = DEVICE_STATE_CYCLE;
break;
}
case DEVICE_STATE_CYCLE:
{
// Schedule next packet transmission
txDutyCycleTime = appTxDutyCycle + randr( 0, APP_TX_DUTYCYCLE_RND );
LoRaWAN.cycle(txDutyCycleTime);
deviceState = DEVICE_STATE_SLEEP;
break;
}
case DEVICE_STATE_SLEEP:
{
LoRaWAN.sleep();
break;
}
default:
{
deviceState = DEVICE_STATE_INIT;
break;
}
}
}

as i see it must be 39 and 40 pins, because of Wire.h what are for I2C connection, check if the pins what connected to htcc-ab02a connected to same name pins of sensor

also you can try use regular example without LoRa, to easily debug

Yes, they are on pins 39 and 40, I have used this simpler code and if it works,

#include “Seeed_BME280.h”
#include <Wire.h>

BME280 bme280;

void setup()
{
pinMode(Vext, OUTPUT);
digitalWrite(Vext, LOW);
delay(500);

Serial.begin(115200);
if(!bme280.init()){
Serial.println(“Device error!”);
}
}

void loop()
{
float pressure;

//get and print temperatures
Serial.print("Temp: ");
Serial.print(bme280.getTemperature());
Serial.println(“C”);//The unit for Celsius because original arduino don’t support speical symbols

//get and print atmospheric pressure data
Serial.print("Pressure: ");
Serial.print(pressure = bme280.getPressure());
Serial.println(“Pa”);

//get and print altitude data
Serial.print("Altitude: ");
Serial.print(bme280.calcAltitude(pressure));
Serial.println(“m”);

//get and print humidity data
Serial.print(“Humidity: “);
Serial.print(bme280.getHumidity());
Serial.println(”%”);

delay(1000);
}

but with the code to connect to lorawan it does not recognize the sensor

but with the code to connect to lorawan it does not recognize the sensor

It sends in serial this?

if(ENABLE_SERIAL){
Serial.println(“Device error!”);
}

or it just sends nothing by lora

firstly, what do i, thats encrease delay here to gett the device more time to init

it does not lift the sensor with that code, it does not send information

the sensor works, I have tested it with the second code that I paste
sensor%202

I’m using the test code, it should work

Minor difference in the sample you were testing the sensor with you are using the BME280 lib. in the code you are using for the Lora example you are using the BMP 280.