I extract this into a separate thread, because it has nothing to do with the initial thread found here:
I need to use a Xiao nrf52840 with the Adafruit-firmware for the Feather nrf52840, because the Seeed-firmware seems to have BLE-issues (see other thread)
Basics are easy, but the pin-mapping is different. So what I tried is this:
- look for hardware-pin on seeed-schema
- look for same hardware-pin on feather-schema
- use pin-number of feather in sketch
- example: A4 (with Seeed-FW) is hardware pin P0.04, which is 14/A0 on the Adafruit-board. This works perfectly fine.
However, this does not work for certain pins, as I do not find them on the Adafruit-schematic.
For example, D9 / P1.14 does not exist on Adafruit.
I am really lost, any help appreciated
Ok, I made myself a small sketch that just tests all pins in a loop for being high, and outputs the given number.
Like this, I was able to create the following table:
However, since the hardware-SPI-pins are not the same when I don’t use the Seeed-firmware, I can of course rewrite to use different pins, but then again the performance is really bad.
So I’d still prefer if Seeed would get their sh*t together and fix the BLE-implementation their firmware!!!
For anyone else’s amusement / use, this is the probing-sketch:
#include <Arduino.h>
#include <Adafruit_TinyUSB.h>
//************************************************************************************
void setup()
{
Serial.begin(115200);
while (!Serial);
for (int pinNumber = 0; pinNumber < 128; pinNumber++) {
pinMode(pinNumber, INPUT_PULLDOWN);
digitalWrite(pinNumber, LOW);
}
}
//**************************************************************************************************
void loop()
{
for (int pinNumber = 0; pinNumber < 128; pinNumber++) {
bool pinRead = digitalRead(pinNumber);
if (pinRead == HIGH) {
Serial.println(pinNumber);
}
}
delay(10);
}