Hello, I am trying to create code for a transmitter and receiver that will turn on a motor when the transmitter is in range, but I’m not sure where to start. I am also attempting to use the HC-05 bluetooth chip to solve this problem, but as both are new to me, I am unsure how to begin. Thank you.
Hi there,
In the case of transmitter-receiver, it sounds like you need two circuits:
one where you’re attaching a receiver and a motor to an Arduino & another for the transmitter circuit. So, when the transmitter comes in range of the receiver, the receiver will get the message and transfer an action to the motor via the controller.
In the case of bluetooth, you need to build one circuit with a motor and bluetooth device, and send the bluetooth a message with some other device, for example your phone.
The second option seems simpler.
To do this with circuito.io - drag & drop your desired motor, controller, and the hc-05 onto the canvas and the schematic diagram and sample code will be created for you automatically.
Once you’ve figured out how to work with each component via the sample code, you can proceed by yourself to mix and match pieces of the code to do your exact logic. i.e - what kind of message will operate the motor and how.
If you require further help at that stage, we are here.