HC-05 and atmega328p

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have set up an atmega328p with an HC05 while a USB to TTL shows me data sent and received on a serial monitor. however... the atmega328p can communicate with the serial monitor and the HC-05 can do the same, but they cannot communicate with each other. The AVR has a program that is supposed to toggle an LED whenever it reads a one, sending that one from the monitor works but sending that one from my phone(connected through Bluetooth) doesn't work(even though that '1' appears on the monitor). I will check if I can transmit to the HC-05 from the avr later. but can anyone tell me what is going on?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you search the forums here, and on the interwebs?  Did you check your wiring?

 

This combination has been the subject of thousands of threads here, on teh arduino community, and other forums.  Your telling us you cannot find ANY help?

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

anonymous69 wrote:
but can anyone tell me what is going on?
First guess is one HC-05 isn't set to central role.

Bluetooth Modules | Martyn Currey

[1/3 page]

If your Android device does not find the BT module the module may be in master/central mode. Change to slave/peripheral mode using the command AT+ROLE0

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a completely different idea, I wanted to do something similar and started looking at a 328. I ended up using an esp32 module. Cheap as chips and has lots of Bluetooth examples. 

regards
Greg

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The connection between an Arduino should be like this https://www.theengineeringprojec...

 

If you're using the  atmega328P chip only, you can follow this video: https://www.youtube.com/watch?v=...

 

It is important to note that some versions of the HC-05 can be directly connected to the Arduino or any 5V microcontroller. But there are some other versions too. Those versions have '3.3V logic' written on the back of the module. Those need logic-level converters to be connected to 5V microcontrollers.  Kindly check which version you got.