Now, I attached the IRQ to 48 and CS to 49, RST left at 4. Of course the sketch is changed accordingly.
And no go.
Do you KNOW where the problem is or how to connect??
Arduino connection
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
You wrote earlier that IRQ should be attached to one of Megas available interrupt pins, w/o saying which they are.
And now you said practically any pin, and it doesn´t work....
Just give me a useful hint, at least
And now you said practically any pin, and it doesn´t work....
Just give me a useful hint, at least
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
A hardware interrupt pin is necessary if your sketch is using hardware interrupts. The sketch you are using seems to be polling instead, so any pin should work.
The factory reset function is an AT command, it does not appear to be related to the hardware reset pin. If you post some photos showing all of your connections, we can try to spot the problem.
The factory reset function is an AT command, it does not appear to be related to the hardware reset pin. If you post some photos showing all of your connections, we can try to spot the problem.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
You already know the sketch. A picture wouldn´t clarify anything.
AT command or not, everything works fine in the Uno - what I need is a translation to Mega.
The pins are set in the config.h
#define BLUEFRUIT_SPI_CS 8//??
#define BLUEFRUIT_SPI_IRQ 7//?? does this need attach.Interrupt ??
#define BLUEFRUIT_SPI_RST 4//??Optional but recommended
#define BLUEFRUIT_SPI_SCK 52//Adafruit
#define BLUEFRUIT_SPI_MISO 50//Adafruit
#define BLUEFRUIT_SPI_MOSI 51//Adafruit
AT command or not, everything works fine in the Uno - what I need is a translation to Mega.
The pins are set in the config.h
#define BLUEFRUIT_SPI_CS 8//??
#define BLUEFRUIT_SPI_IRQ 7//?? does this need attach.Interrupt ??
#define BLUEFRUIT_SPI_RST 4//??Optional but recommended
#define BLUEFRUIT_SPI_SCK 52//Adafruit
#define BLUEFRUIT_SPI_MISO 50//Adafruit
#define BLUEFRUIT_SPI_MOSI 51//Adafruit
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
FYI Mega interrupt pins.
Tried #20 to no avail
Mega, Mega2560, MegaADK 2, 3, 18, 19, 20, 21
(pins 20 & 21 are not available to use for interrupts while they are used for I2C communication)
Tried #20 to no avail
Mega, Mega2560, MegaADK 2, 3, 18, 19, 20, 21
(pins 20 & 21 are not available to use for interrupts while they are used for I2C communication)
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
Pictures very often do clarify things. They help us spot problems such as marginal solder connections or ground-loop issues that are not detectable in a simple list of pin to pin connections.You already know the sketch. A picture wouldn´t clarify anything.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
This is not good - I keep telling you the sketch and the BT work, only when moving the pins to a different Arduino it doesn´t. And the Mega works just fine w/ the sketch where I intend to imply the BT later. I even changed between the two a couple of times w/ the same result. So NO hardware OR software problem!!!!
But I´ll comply, given you provide a helpful answer. And don´t just try to find errors and ask about the connections - they´re OK.
Give me an answer w/ a programming solution. If you can´t then don´t.
Pins are as said earlier
But I´ll comply, given you provide a helpful answer. And don´t just try to find errors and ask about the connections - they´re OK.
Give me an answer w/ a programming solution. If you can´t then don´t.
Pins are as said earlier
- Attachments
-
- 20230116_151604.jpg (461.97 KiB) Viewed 136 times
-
- 20230116_151629.jpg (255.49 KiB) Viewed 136 times
- adafruit_support_bill
- Posts: 88154
- Joined: Sat Feb 07, 2009 10:11 am
Re: Arduino connection
It is not clear why you are insisting on a programming solution then.So NO hardware OR software problem!!!!
Keep in mind that the Mega is but one of hundreds of Arduino compatible processor boards. And it is not one that we manufacture, sell or use internally at Adafruit. It is not realistic to expect that we have a documented off-the-shelf solution for every possible combination of hardware components.
Also keep in mind that system integration and debugging - even at this miniscule scale - is by nature an iterative process of questioning, theorizing and testing. When all the common issues are ruled out, you need to start taking a wider view.
I will refer this to someone more familiar with this particular Bluefruit board. But you should be prepared for them to ask more questions.
In the mean-time, please review the "Be Excellent" policy in our terms of service.
https://www.adafruit.com/terms_of_service
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Arduino connection
The controller example sketch generally does not need any modifications for use with a Mega. Here's a link to where the controller example sketch code lives for reference:
https://github.com/adafruit/Adafruit_Bl ... controller
The only difference between usage on the UNO and the Mega will be the SPI pins wired to on the Mega itself. As mentioned above, the hardware SPI pins on the Mega are:
The other pins are used as simple GPIO and do not need changing. The same pins should work just as well on the UNO and the Mega.
To verify this, I wired an Adafruit Bluefruit LE SPI Friend:
https://www.adafruit.com/product/2633
to a Mega and ran the controller sketch - with no changes to any of the code. It runs as expected:
Double check your wiring and try the controller sketch again. If it still is not working, check your soldering (even though it worked on an UNO). The one visible pin looks potentially under soldered (arrow). It may also be worth trying different wiring in case there's a bad crimp (circle).
https://github.com/adafruit/Adafruit_Bl ... controller
The only difference between usage on the UNO and the Mega will be the SPI pins wired to on the Mega itself. As mentioned above, the hardware SPI pins on the Mega are:
Code: Select all
MISO = 50
MOSI = 51
SCK = 52
Code: Select all
CS = 8
IRQ = 7
RST = 4
https://www.adafruit.com/product/2633
to a Mega and ran the controller sketch - with no changes to any of the code. It runs as expected:
Double check your wiring and try the controller sketch again. If it still is not working, check your soldering (even though it worked on an UNO). The one visible pin looks potentially under soldered (arrow). It may also be worth trying different wiring in case there's a bad crimp (circle).
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
Thanks - but having reviewed all solderings and connections I still only get a number of backward question marks, repeatedly. You made no alterations to the sketch?
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Arduino connection
Correct - no changes to the sketch.
Double check your baud rate setting in the Arduino Serial Monitor. What you describe sounds like the sort of garbled output you'd see if the sketch / monitor bauds don't match. Should be 115200.
Double check your baud rate setting in the Arduino Serial Monitor. What you describe sounds like the sort of garbled output you'd see if the sketch / monitor bauds don't match. Should be 115200.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
And so it is....Still no..
Other suggestions?
Other suggestions?
- adafruit_support_carter
- Posts: 29483
- Joined: Tue Nov 29, 2016 2:45 pm
Re: Arduino connection
Can you repeat the previous success when using the UNO? Use the same wires, etc. Just move the connections back to the UNO and see if it works again as it did before.
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
How should GND be wired- common for power supply and Arduino?
- walterkorner
- Posts: 28
- Joined: Sun Jul 05, 2020 9:17 am
Re: Arduino connection
It gets different - now I get the q marks w/ a carriage return
Please be positive and constructive with your questions and comments.