Skip to content

Commit

Permalink
use pins defined as macros in scanner_curses.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Mar 7, 2024
1 parent 056b80a commit 5fea46f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples_linux/ncurses/scanner_curses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<a>.<b>
// ie: RF24 radio(<ce_pin>, <a>*10+<b>); 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
Expand Down

0 comments on commit 5fea46f

Please sign in to comment.