Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation change for Arduino pro micro pinout for serial gateway #1555

Open
heltrix opened this issue Nov 14, 2023 · 2 comments
Open

Documentation change for Arduino pro micro pinout for serial gateway #1555

heltrix opened this issue Nov 14, 2023 · 2 comments

Comments

@heltrix
Copy link

heltrix commented Nov 14, 2023

When setting up an NRF24 serial gateway it fails on my Arduino pro micro unless the CE and CSN pins are manually specified by adding the lines:

#define MY_RF24_CE_PIN 9
#define MY_RF24_CS_PIN 10

The following debug logs are shown.

0;255;3;0;9;40371 TSM:FAIL:DIS
0;255;3;0;9;40371 TSF:TDI:TSL
0;255;3;0;9;50373 TSM:FAIL:RE-INIT
0;255;3;0;9;50373 TSM:INIT
0;255;3;0;9;50378 !TSM:INIT:TSP FAIL
0;255;3;0;9;50379 TSM:FAIL:CNT=4
0;255;3;0;9;50379 TSM:FAIL:DIS
0;255;3;0;9;50379 TSF:TDI:TSL

@mfalkvidd
Copy link
Member

@heltrix what board are you using (in the Arduino IDE)? What version of the board definitions?
Selecting a Pro Micro board such as the Lilypad sets ARDUINO_ARCH_AVR which automatically selects the correct pins at

#define DEFAULT_RF24_CE_PIN (9) //!< DEFAULT_RF24_CE_PIN
but that doesn't seem to be the case for the setup you are using.

@mfalkvidd
Copy link
Member

If I add

#define XSTR(x) STR(x)
#pragma message "CE pin used: " XSTR(DEFAULT_RF24_CE_PIN)
#pragma message "CS pin used: " XSTR(DEFAULT_RF24_CS_PIN)

after #include <MySensors.h> in https://github.com/mysensors/MySensors/blob/development/examples/GatewaySerial/GatewaySerial.ino#L90 I get the following output:

GatewaySerial.ino:93:57: note: #pragma message: CE pin used: (9)
GatewaySerial.ino:94:57: note: #pragma message: CS pin used: (SS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants