HC-05

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
DBBAdafruit
 
Posts: 19
Joined: Sat Jul 17, 2021 12:12 am

HC-05

Post by DBBAdafruit »

I am not having success using the Feather M0 for BLE projects and have not had any help on the forums and are therefore considering going back to Arduino Uno where there are a lot of example projects. But I cannot seem to find a HC-05 or 06 Bluetooth module for sale. I must be missing it on your website since it is a popular product. Or do you have an equivalent (Bluetooth Classic module for Arduino)?

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: HC-05

Post by Franklin97355 »

It looks like the modules are available in other places and can be connected to the feather. What are you having trouble with? Perhaps we can help.

User avatar
adafruit2
 
Posts: 22148
Joined: Fri Mar 11, 2005 7:36 pm

Re: HC-05

Post by adafruit2 »

we dont stock anything with 'classic anymore. nordic only makes BLE - even espressif is dropping classic in their newer chips

User avatar
DBBAdafruit
 
Posts: 19
Joined: Sat Jul 17, 2021 12:12 am

Re: HC-05

Post by DBBAdafruit »

franklin97355 wrote:It looks like the modules are available in other places and can be connected to the feather. What are you having trouble with? Perhaps we can help.
Yes, thank you.

I want to display the output of an analog sensor on my smart phone. I know I can use the Bluefruit Connect app to do it, but I would like a more sophisticated interface than it allows. I'd like to use MIT's appinventor program but I need an example of it using a Feather M0. Any examples I've found are for the phone to control the Feather rather than the Feather sending data to the phone. Most other examples are using an Arduino. It should be a rather straight forward process but I have not found one that applies directly and my attempts have so far failed. Do you know of an example or tutorial using a Feather and appinventor to receive analog data?

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: HC-05

Post by Franklin97355 »

Can you post a link to a program that you have found that works on the Arduino that will work as you want?

User avatar
DBBAdafruit
 
Posts: 19
Joined: Sat Jul 17, 2021 12:12 am

Re: HC-05

Post by DBBAdafruit »

franklin97355 wrote:Can you post a link to a program that you have found that works on the Arduino that will work as you want?
I'm not sure if this is what you want - it's my Arduino code that I want to see the output (ie the Serial.print() info) on my phone which would have an App Inventor app installed.

Code: Select all

 /*  Rev 1.3    */
  float zeroTank = 6.39;  //560 = 4.5"  720=6.3" 
  float tankHeight = 5.1;  //total height of tank
  float totalGal= 39.0 ;  //total capacity of tank
  float maxInch = 8.0;  //calibration point
  int calMin = 128;  //0 pressure at sensor, .5V=102, .75V=153 .63V=128
  int calMax = 895;  //895=8.0"
  float tankZero = 6.3;  //# inches tank bottom is from sensor
  float heightinTank;

// the setup routine runs once when you press reset:
void setup() {
  
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
 /* // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
  float voltage = sensorValue * (5.0 / 1023.0);
  
  float absHeight = ((sensorValue-calMin) *maxInch )/(calMax-calMin); 
  
  heightinTank = absHeight-zeroTank;
  if (heightinTank <0) { heightinTank = 0;
}
  float gallons = heightinTank*totalGal/tankHeight;
  
  // print out the value you read:
 Serial.print(sensorValue);
 Serial.print(" ");
 Serial.print(voltage);
 Serial.print(" ");
 Serial.print("V   "); 
 Serial.print(absHeight);  
 Serial.print(" in   ");
 Serial.print(heightinTank); 
 Serial.print(" in   ");
 Serial.print(gallons);
 Serial.println(" gal  ");
*/
 delay(2000);
 }
if you want a working example similar to what I want including the App Inventor part, that's what I cannot find. Examples using an Arduino instead of the feather use Bluetooth Classic rather than BLE as I would like to use.

User avatar
DBBAdafruit
 
Posts: 19
Joined: Sat Jul 17, 2021 12:12 am

Re: HC-05

Post by DBBAdafruit »

franklin97355 wrote:Can you post a link to a program that you have found that works on the Arduino that will work as you want?
I have decided to switch back to the Arduino and HC-05 for my project, so please disregard my questions on this topic. The Feather is too specialized for me to start learning Bluetooth. Maybe as I get more comfortable with Bluetooth, I'll try again. Thanks for your help.

User avatar
DBBAdafruit
 
Posts: 19
Joined: Sat Jul 17, 2021 12:12 am

Re: HC-05

Post by DBBAdafruit »

DBBAdafruit wrote:
franklin97355 wrote:Can you post a link to a program that you have found that works on the Arduino that will work as you want?
I have decided to switch back to the Arduino and HC-05 for my project, so please disregard my questions on this topic. The Feather is too specialized for me to start learning Bluetooth. Maybe as I get more comfortable with Bluetooth, I'll try again. Thanks for your help.
Actually, I just got the attached Arduino and app inventor code that will work on an Arduino/appinventor. Can you instead suggest how I can convert this to Adafruit Feather M0. If I can get something close to what I want, then I can figure it out from there.
ClassicBt_Arduino_ToApp.txt
(1.02 KiB) Downloaded 15 times
https://www.dropbox.com/s/j3217xe1rxfm3 ... p.aia?dl=0


Thanks for your help

Doug

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: HC-05

Post by Franklin97355 »

Sorry, I am not fluent with App Inventor, Perhaps you should ask in their forum or customer support. Can you explain what you want to accomplish in the long run (without software names)?

User avatar
DBBAdafruit
 
Posts: 19
Joined: Sat Jul 17, 2021 12:12 am

Re: HC-05

Post by DBBAdafruit »

franklin97355 wrote:Sorry, I am not fluent with App Inventor, Perhaps you should ask in their forum or customer support. Can you explain what you want to accomplish in the long run (without software names)?
Thanks for your response. In will wait to get my HC-05 and see if there are still issues - should be a lot easier.

User avatar
Franklin97355
 
Posts: 23910
Joined: Mon Apr 21, 2008 2:33 pm

Re: HC-05

Post by Franklin97355 »

Let us know how it goes.

User avatar
DBBAdafruit
 
Posts: 19
Joined: Sat Jul 17, 2021 12:12 am

Re: HC-05

Post by DBBAdafruit »

franklin97355 wrote:Let us know how it goes.
Well, it’s going slow! Got the HC-05 but it is not working - does not show up on my phone or iPad. It’s possible I blew it up because I didn’t provide 3.3V to the Rx pin, instead I went directly from Arduino Uno Tx pin to the HC-05. In any case, now when I provide 5V to Vcc, gnd to gnd and tie Tx to Rx on the HC-05, nothing appears on my phone or on the Bluetooth app. Don’t know if they are defective or I damaged them. Will see when I get more!

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”