Power LEDs from RAK5005

I’m using a RAK5005-0 base and a RAK4631 core.
The RAK5005-0 has a series of headers (J10, J11, J12), J11 exposes two IO pins PIN 2 = IO1 PIN3 = IO2. The table here shows that IO1 and IO2 correspond to PINs 29 and 30 respectively.

In the program we set

 pinMode(29, OUTPUT);
 pinMode(30, OUTPUT);

LEDs (including resistors) are wired up to the respective pins; PIN29/J11-2/IO1 works as expected, however PIN30/J11-3/IO2 does not, rather this LED is constantly on no matter the call to

  digitalWrite(30, LOW);

I notice in the documentation poitned to above that a note against J11-30 states

- IO2
- Used for 3V3_S enable

Does this mean that we actually have only one IO pin available?

Hi @billr , this is the pin mapping from the variants.h file.

static const uint8_t WB_IO1 = 17;	   // SLOT_A SLOT_B
static const uint8_t WB_IO2 = 34;	   // SLOT_A SLOT_B
static const uint8_t WB_IO3 = 21;	   // SLOT_C
static const uint8_t WB_IO4 = 4;	   // SLOT_C
static const uint8_t WB_IO5 = 9;	   // SLOT_D
static const uint8_t WB_IO6 = 10;	   // SLOT_D
static const uint8_t WB_SW1 = 33;	   // IO_SLOT
static const uint8_t WB_A0 = 5;		   // IO_SLOT
static const uint8_t WB_A1 = 31;	   // IO_SLOT
static const uint8_t WB_I2C1_SDA = 13; // SENSOR_SLOT IO_SLOT
static const uint8_t WB_I2C1_SCL = 14; // SENSOR_SLOT IO_SLOT
static const uint8_t WB_I2C2_SDA = 24; // IO_SLOT
static const uint8_t WB_I2C2_SCL = 25; // IO_SLOT
static const uint8_t WB_SPI_CS = 26;   // IO_SLOT
static const uint8_t WB_SPI_CLK = 3;   // IO_SLOT
static const uint8_t WB_SPI_MISO = 29; // IO_SLOT
static const uint8_t WB_SPI_MOSI = 30; // IO_SLOT

You can use IO1 and IO2 via

pinMode(WB_IO1, OUTPUT);
pinMode(WB_IO2, OUTPUT);

thanks for that @carlrowan

but those pin numbers are completely different to the RAK5005-0 documentation

… and I’ve just realised that those pins are the pins for the integrated MCU module connector!

Hi @billr ,

Sorry for the confusion but those pin numbers are for the connector pin# and not for the mapping.

Then different WisBlock Core have different pin assignments at low level that is why there is a WB_xxxx format to control the IO and peripheral of WisBlock (WB = WisBlock).

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.