1

I am looking to make some wireless motor controllers, and am going to use an Arduino connected to an HC-05 module as a master controller, with a potentiometer as the speed controller input. There will then be another arduino connected to an HC-06 module as a slave, with the arduino outputting to a PWM motor controller.

I am happy with programming of a single arduino with a potentiometer and the PWM motor controller as an all in one device, however what I would like to understand is how the HC-05 and HC-06 devices are spliced into the scheme. I want to be clear that I don't want someone to come up with the sketch for me as I will not learn anything that way!

I have studied lots of online tutorials about using these devices, and unfortunately they all go straight into using it for an LED blink or something like that, and as a result to my 54 year old brain I am unable to deconstruct the sketch sufficiently to understand which bits of the sketch pertain ONLY to the HC06/05 usage.

For me to understand it I am hoping that someone can point me to (or maybe do) a step by step tutorial that takes the process in three steps;

Firstly a sketch that does something (say you press a button and a buzzer sounds, all on one arduino

Secondly, a completely basic sketch that shows the minimum necessary to connect the master and slave without any actions, buttons, LED's buzzers etc.

Lastly, a sketch that combines the two, where the button is on the master, the buzzer is on the slave, and the sketches that show where those spliced in bits of code go.

In that way, I will be able to differentiate in my head which bits belong to which part of the system. I know it is not a conventional way to learn, but for me it will then allow me to attempt to construct the correct master / slave sketches required for my project. I used this method successfully for making sketched for LCD displays so I am hoping it will work again!

Happy to explain more but as I say, I want to learn for myself and would appreciate tutorials an old git can follow!

Cheers

Les

4
  • Any button tutorial should resolve the first ask--it's a common button tutorial topic. Most HC05/06 examples/tutorials firat show how to send or receive data as their first step. It might be helpful to include info on what specific issues you're running in to or provide links to the tutorials/examples you're looking at that are causing confusion. IIRC there should be examples of both buttons and comms included in the IDE examples as well. Commented Jun 12, 2021 at 11:19
  • I think you misunderstand - yes, I can get an individual button / buzzer sketch, but as for the basic HC-05 / HC06 sketches, I am not certain that they are just 'blank' sketches. The third part is that I want the first sketch to be integrated with the second sketch so that I can see the logical progression from one to another - if those sketches are not all in the same site, I can't be sure that the last sketch is indeed an amalgam of the two. Commented Jun 12, 2021 at 11:31
  • please add a program listing of the 'blank' HC05 sketch that you are talking about Commented Jun 12, 2021 at 14:03
  • Hi all, I had someone external to this site direct me to this link martyncurrey.com/… which has some follow on pages that progress the use, so I am going to go through that and see if this is what I need Commented Jun 14, 2021 at 8:18

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.