0

Bluefruit Le Uart Friend and Arduino
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Bluefruit Le Uart Friend and Arduino

by adafruit_support_rick on Sun Mar 19, 2017 8:47 am

Oh, it's there. The problem is that AppData is a hidden folder. You have to go into the file explorer and type in the path. On my computer, Arduino15 is here:
C:\Users\rick\AppData\Local

Substitute your username and type that into file explorer and you'll find Arduino15.

You also seem to be confusing compilation errors with execution errors. You are seeing a compilation error. It has nothing at all to do with the Bluefruit LE. You are not getting to the point where the Bluefruit is involved in the process. That's why we want you to remove and reinstall the Arduino application.

adafruit_support_rick
 
Posts: 34871
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Bluefruit Le Uart Friend and Arduino

by dina91 on Sun Mar 19, 2017 5:34 pm

I found the local folder but I didn't find Arduino15. I did show all the folders that might be hidden but still not able to locate. I had tried to upload the example from different computer but same error when I compile.

dina91
 
Posts: 18
Joined: Tue Feb 28, 2017 1:01 am

Re: Bluefruit Le Uart Friend and Arduino

by adafruit_support_rick on Sun Mar 19, 2017 6:07 pm

Arduino15 is inside the Local folder. It must be there. Arduino won't work without it.

adafruit_support_rick
 
Posts: 34871
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Bluefruit Le Uart Friend and Arduino

by dina91 on Mon Mar 20, 2017 12:10 am

I had to use different laptop and the error was gone. When I upload the factory reset sketch it upload sucessfully but serial monitor say couldn't factory reset. When I run the atcommand and disable the factory reset, I get nothing when I type the ATI and send it as showing
Attachments
At Command.PNG
At Command.PNG (44.15 KiB) Viewed 426 times

dina91
 
Posts: 18
Joined: Tue Feb 28, 2017 1:01 am

Re: Bluefruit Le Uart Friend and Arduino

by adafruit_support_rick on Mon Mar 20, 2017 6:04 am

please post some clear, detailed pictures of your soldering and wiring

adafruit_support_rick
 
Posts: 34871
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Bluefruit Le Uart Friend and Arduino

by dina91 on Mon Mar 20, 2017 11:16 am

I have posted the image earlier in the discussion. There is it.
Attachments
image1.JPG
image1.JPG (748.9 KiB) Viewed 405 times

dina91
 
Posts: 18
Joined: Tue Feb 28, 2017 1:01 am

Re: Bluefruit Le Uart Friend and Arduino

by adafruit_support_rick on Mon Mar 20, 2017 11:44 am

So, it looks like you have TXD connected to 10 RXD connected to 9. CTS is 11, and RTS is 12. Is that right?
Have you changed the pin definitions in bluefruitconfig.h to match those pin assignments?

adafruit_support_rick
 
Posts: 34871
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Bluefruit Le Uart Friend and Arduino

by dina91 on Mon Mar 20, 2017 12:08 pm

I have the follwing connections:
Mod>> 12
CTS >11
TXD >10
RXI >9
RTS>8

The only thing is differnt from the sketch is the RTS and I changed it to 8 instead of -1.

dina91
 
Posts: 18
Joined: Tue Feb 28, 2017 1:01 am

Re: Bluefruit Le Uart Friend and Arduino

by adafruit_support_rick on Mon Mar 20, 2017 7:20 pm

OK. You also have to change the ble constructor to use software serial. Have you done that? By default, it's configured for hardware SPI

Code: Select all | TOGGLE FULL SIZE
/ Create the bluefruit object, either software serial...uncomment these lines

SoftwareSerial bluefruitSS = SoftwareSerial(BLUEFRUIT_SWUART_TXD_PIN, BLUEFRUIT_SWUART_RXD_PIN);

Adafruit_BluefruitLE_UART ble(bluefruitSS, BLUEFRUIT_UART_MODE_PIN,
                      BLUEFRUIT_UART_CTS_PIN, BLUEFRUIT_UART_RTS_PIN);

/* ...or hardware serial, which does not need the RTS/CTS pins. Uncomment this line */
// Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, BLUEFRUIT_UART_MODE_PIN);

/* ...hardware SPI, using SCK/MOSI/MISO hardware SPI pins and then user selected CS/IRQ/RST */
//Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_CS, BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);

/* ...software SPI, using SCK/MOSI/MISO user-defined SPI pins and then user selected CS/IRQ/RST */
//Adafruit_BluefruitLE_SPI ble(BLUEFRUIT_SPI_SCK, BLUEFRUIT_SPI_MISO,
//                             BLUEFRUIT_SPI_MOSI, BLUEFRUIT_SPI_CS,
//                             BLUEFRUIT_SPI_IRQ, BLUEFRUIT_SPI_RST);

adafruit_support_rick
 
Posts: 34871
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Bluefruit Le Uart Friend and Arduino

by adafruit2 on Sun Apr 16, 2017 3:51 pm

i just tried an arduino mega with
vin -> 5v, gnd to ground, cts to ground. RXI to #18 (TX1) and TXO to #19 (RX1) and created the object with

Adafruit_BluefruitLE_UART ble(Serial1, BLUEFRUIT_UART_MODE_PIN);

and it works, hardware serial works best and you can do it on the mega, so its suggested.

adafruit2
Site Admin
 
Posts: 15455
Joined: Fri Mar 11, 2005 7:36 pm

Re: Bluefruit Le Uart Friend and Arduino

by jmuhammad on Thu Oct 12, 2017 6:30 pm

I cannot perform factory reset using atcommand sketch.
I get this error in Arduino:

"Arduino: 1.8.3 (Windows 7), Board: "Arduino/Genuino Uno"
atcommand:67: error: 'BLUEFRUIT_HWSERIAL_NAME' was not declared in this scope
Adafruit_BluefruitLE_UART ble(BLUEFRUIT_HWSERIAL_NAME, BLUEFRUIT_UART_MODE_PIN);
exit status 1
'BLUEFRUIT_HWSERIAL_NAME' was not declared in this scope

How do I declare this?

jmuhammad
 
Posts: 16
Joined: Fri Jan 29, 2016 4:22 pm

Re: Bluefruit Le Uart Friend and Arduino

by adafruit2 on Thu Oct 12, 2017 7:12 pm

UNO does not have hardware serial, you must use Software Serial :)

adafruit2
Site Admin
 
Posts: 15455
Joined: Fri Mar 11, 2005 7:36 pm

Re: Bluefruit Le Uart Friend and Arduino

by jmuhammad on Thu Oct 12, 2017 7:20 pm

OK, thanks.
I also have a Nano...does that have HW serial?

jmuhammad
 
Posts: 16
Joined: Fri Jan 29, 2016 4:22 pm

Re: Bluefruit Le Uart Friend and Arduino

by adafruit2 on Thu Oct 12, 2017 7:30 pm

nope

adafruit2
Site Admin
 
Posts: 15455
Joined: Fri Mar 11, 2005 7:36 pm

Re: Bluefruit Le Uart Friend and Arduino

by jmuhammad on Thu Oct 12, 2017 7:38 pm

OK, I got the sw serial working.
The pdf was not clear on this to me.
A couple of other questions:

1) I read in another post that the Bluefruit LE Uart Friend is fixed at 9600; is this true???
That would be disappointing if so.

2) I issued the "AT+BAUDRATE=115200" command and Bluefruit LE Uart Friend responded OK.
I then issued "AT+BAUDRATE" to check but it did not return the baudrate it is at. Why did this command not work?

Thanks.

jmuhammad
 
Posts: 16
Joined: Fri Jan 29, 2016 4:22 pm

Please be positive and constructive with your questions and comments.


cron