Arduino & CC3000 Wifi & NRF24L01+ over SPI
-
Anyone know how to connect two SPI devices to an Arduino Uno?
Separately, the CC3000 Wifi module and NRF24L01+ work normally.
However, if I wire them in parallel, like for i2c, only the CC3000 works.
Is there some type of input-output connection for one master and multiple slaves?
-
I found the solution on this page: http://mathertel.blogspot.com/2013/04/using-spi-bus-with-ethernet-sd-card-and.html
The key is setting the Chip Select (CS) line to be different for each module.
For the CC3000...
"#define ADAFRUIT_CC3000_CS 7"
Pin 7 is being used exclusively to select the Wifi module.
https://learn.adafruit.com/adafruit-cc3000-wifi/cc3000-breakoutFor the NRF24L01+...
"RF24 radio(9,10);"
Pin 9 is being used for Chip Enable (CE) and Pin 10 is Chip Select (CS).
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
http://maniacbug.github.io/RF24/classRF24.htmlThe other SPI pins: CLK, MISO, MOSI, are shared by the two modules and get wired in parallel.
-
Goood stuff! What is it your making?
Is it a spark core??
-
or a WLAN Gateway
-
@jesse
I did that on my Mega too
-
@gregl said:
Goood stuff! What is it your making?
Is it a spark core??A Wifi bridge so I can use $1 NRF24L01+ modules to send data to my database or to the internet.
-
I have a similar problem.
I dont have the CC3000 breakboard I have the shield so changing pin address for this board is not going to work.
Instead I've changed the NRF24l01+ to use pins CE 35, CS 34.
I've also changed the init of the gateway to use pins 40,41,42 for the leds.(I'm using a mega btw)
So just using the MySensors skecth it works fine.
But as soon as I initialise the CC3000, the gw.begin() doesnt work anymore.
Were you able to get this to work?
Did you have to change any libraries?
Cheers
-
@jesse said:
I found the solution on this page: http://mathertel.blogspot.com/2013/04/using-spi-bus-with-ethernet-sd-card-and.html
The key is setting the Chip Select (CS) line to be different for each module.
For the CC3000...
"#define ADAFRUIT_CC3000_CS 7"
Pin 7 is being used exclusively to select the Wifi module.
https://learn.adafruit.com/adafruit-cc3000-wifi/cc3000-breakoutFor the NRF24L01+...
"RF24 radio(9,10);"
Pin 9 is being used for Chip Enable (CE) and Pin 10 is Chip Select (CS).
http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo
http://maniacbug.github.io/RF24/classRF24.htmlThe other SPI pins: CLK, MISO, MOSI, are shared by the two modules and get wired in parallel.
Hi do you still have a Gateway code when using CC3000 and arduino Mega or UNO(if it fits)?
Suggested Topics
-
💬 ESPboy: Games, IoT, STEM for education & fun (ESP8266 core)
OpenHardware.io • 9 Jun 2020, 18:29 • openhardware.io 14 May 2021, 03:04 -
Assistance on sensor project
My Project • 29 Oct 2017, 15:31 • Sally Hayford 29 Oct 2017, 22:36 -
Arduino Mini Pro 5v - how to power
Troubleshooting • 3 Sept 2014, 21:43 • ddluk 11 Sept 2014, 03:30 -
Arduino Pro mini + RF 433 MHz as Gateway
General Discussion • 8 Nov 2015, 20:47 • lrtsenar 9 Nov 2015, 02:37 -
💬 Arduino UNO NRF24L01+ Shield
OpenHardware.io • 6 May 2019, 04:58 • openhardware.io 9 May 2019, 09:14 -
💬 MyThermostat
OpenHardware.io • 18 Mar 2019, 12:49 • openhardware.io 22 Mar 2019, 21:17 -
💬 Extremely Simple Arduino Pro-Mini LoRa Water Leak Detector
OpenHardware.io • 26 Nov 2017, 01:53 • openhardware.io 4 Mar 2018, 16:24 -
Home Automation and monitoring
My Project • 26 Jun 2016, 23:04 • sudo_bash80 26 Jun 2016, 23:04