Arduino GPIO control in RAK3172 with RUI3 programming?

I am not able to successfully activate PA8 on the RAK3172 (pin 19) to be a GPIO digital output. I’ve searched thru the AT commands documentation and RAK3172 datasheet and tried various approaches by my DVM shows no ability to drive the Pin 19 HIGH or LOW on the RAK3172.

I am using a RAK3172 (AT+VER=RUI_4.1.0_RAK3172-E) on a custom PCBA .

Arduino preferences Additional boards manager URLs includes: •

In the Arduino Board Manager I selected “WisDuo RAK3172 Evaluation Board”. Is this the problem, or what am I not understanding?

My Arduino program reads my sensors fine and transmit the LoRaWan data properly to my Chirpstack Gateway using RUI3 commands. Here is a simple test code snippet that demonstrates the failure to activate and control Pin 19.

/*  Code snippet to test control of RAK3172 Pin 19, GPIO PA8 */

uint8_t ledUserBlue = 0x13;     // Programmable LED to Pin 19 of RAK3172

#define OTAA_PERIOD   (2*60*1000)

void setup() {
  Serial.begin(115200, RAK_AT_MODE);

  pinMode(ledUserBlue, OUTPUT);

void loop() {
  // put your main code here, to run repeatedly:

Thanks in advance for guidance!

Pin number on the module and GPIO numbers are different.

If you want to use PA8, the correct GPIO number is 0x08

1 Like

@beegee Thanks! I looked at a lot of the on line documentation including the schematic of the module but did not come across this RAK3172 module pin mapping, including what I thought was a mapping of module pin 19 to PA8. I can now move forward after you came to my aid and resolved this minor issue that had become a nuisance!

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