Hardware Bluefruit LE SPI Friend (4119)?
FW 06.2
OS W10
Arduino Uno R3/ Mega 2560
Problems:
Trying to set up the controller sketch (from BluefruitLE nRF51) I use the recommended (below) pinouts for Arduino Uno, and it works fine, so no hardware or software problem.
But, since I need more pins than the Uno provides, I try to transfer this to the Mega, which only gives
me the "Couldn't factory reset". So, what would be the preferred settings w/ the Mega in this case?
I only need the BT to perform controller commands.
/*PINS
4 RST
7 IRQ
8 CS
11 MOSI
12 MISO
13 SCK
*/
Rgds
Walter Körner
Arduino connection
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
On a Mega, the SPI pins are in different locations:
MISO = 50
MOSI = 51
SCK = 52
And IRQ should connect to one of the available interrupt pins on the Mega:
https://arduinogetstarted.com/reference/attachinterrupt
MISO = 50
MOSI = 51
SCK = 52
And IRQ should connect to one of the available interrupt pins on the Mega:
https://arduinogetstarted.com/reference/attachinterrupt
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
Thanks - consider including it in your tutorial.
But, why is it connected to pin7 in your Uno sketch then?
It´s not a standard pin and I don´t see a different attach command?
But, why is it connected to pin7 in your Uno sketch then?
It´s not a standard pin and I don´t see a different attach command?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
Please post a link to the example sketch you are using. It is possible that the sketch does not utilize the interrupt.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
Disconnecting the interrupt doesn´t help
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
The link you posted requires a login.
Our tutorial for the board does cover pin configuration here:
https://learn.adafruit.com/introducing- ... ed-2177150
And SPI specifically further down the page: https://learn.adafruit.com/introducing- ... ns-2177160
Our tutorial for the board does cover pin configuration here:
https://learn.adafruit.com/introducing- ... ed-2177150
And SPI specifically further down the page: https://learn.adafruit.com/introducing- ... ns-2177160
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
Hi - I was, of course, referring to settings for the Mega
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
I mean the "controller" sketch, as said before.
The IRQ is requred in the Uno sketch
The IRQ is requred in the Uno sketch
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
The IRQ pin does get used. But it appears that it is polled for SPI communication, so it does not need to be a hardware interrupt pin.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
And what does that mean, exactly, for the sketch and wiring?
PLS tell
PLS tell
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
It means that the IRQ pin specified for the IRQ in your sketch should match the one actually connected.
The pin is polled to determine if there is any data to read. Left unconnected, the pin will 'float' and the value at any given time is unpredictable. Random noise on the pin may give the appearance of working normally.
The pin is polled to determine if there is any data to read. Left unconnected, the pin will 'float' and the value at any given time is unpredictable. Random noise on the pin may give the appearance of working normally.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
So we´re back tp my original question - the problem is that, since it doesn´t work w/ pin 4, can I use any other pin then? As long as the setting is correct? Or which pins are preferred?
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
Sorry pin 7 in previous post
Please be positive and constructive with your questions and comments.