From 5fea46fcb68247f212d8408c525a181d85fab37c Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Wed, 6 Mar 2024 22:09:11 -0800 Subject: [PATCH] use pins defined as macros in scanner_curses.cpp --- examples_linux/ncurses/scanner_curses.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples_linux/ncurses/scanner_curses.cpp b/examples_linux/ncurses/scanner_curses.cpp index 24b959f0..1c45bf3d 100644 --- a/examples_linux/ncurses/scanner_curses.cpp +++ b/examples_linux/ncurses/scanner_curses.cpp @@ -30,9 +30,14 @@ using namespace std; // CE Pin uses GPIO number with BCM and SPIDEV drivers, other platforms use their own pin numbering // CS Pin addresses the SPI bus number at /dev/spidev. // ie: RF24 radio(, *10+); spidev1.0 is 10, spidev1.1 is 11 etc.. - +#define CSN_PIN 0 +#ifdef MRAA + #define CE_PIN 15 // GPIO22 +#else + #define CE_PIN 22 +#endif // Generic: -RF24 radio(22, 0); +RF24 radio(CE_PIN, CSN_PIN); /****************** Linux (BBB,x86,etc) ***********************/ // See http://nRF24.github.io/RF24/pages.html for more information on usage // See http://iotdk.intel.com/docs/master/mraa/ for more information on MRAA