Hello all,
I am having trouble getting HC-12 modules working for a project. I plan to use several HC-12's with PIR sensors to make a long range wireless motion alarm system. Each unit will just transmit a number giving it an ID and triggering an alarm at the receiving unit. I began asking Mark Hughes about my problems in an earlier post of his but this has expanded to the point I need to start a new post. I am using a sketch Mark wrote for the HC-12 that also enables the controller to send AT commands. I did a cut and paste of his sketch. I also deleted and started over with a new sketch a few times now.
I have several arduinos(uno, 2560, knockoff nano's) that I have tried to use. I have a few different HC-12's from two different knockoff companies. I also am running the proper driver for the knockoff boards and had to update avrdude on a couple in order for them to be seen by the IDE.
I have connected some of the boards to a PIR or a DHT sensor and those read on the serial monitor as they should. I also looked for some sketch already written that I could use to test this besides Marks' but have found nothing yet. I think his is perfect thought for what I am trying to figure out as I need something going in and out of each board. I have also played with baud rates just to rule that out and ended with everything set at 9600. I may be leaving out some important facts. If so, let me know and I will get it up asap.
The problem I am having is that when data is sent, it does not show up on the serial monitor on the receiving end. I first noticed when I would send the AT command and the HC-12 would not return an OK. I contacted Mark through another thread yesterday and he made a couple of suggestions. His first suggestion was to connect the two micro boards together without the HC-12's. I did as he suggested and connected the transmit to the receive and the receive to the transmit. I started out using an uno and a nano. I got nothing this way in the serial monitor. I did see the receive led flash when I hit the send key going both ways. Next I tried a pair of nano's. I got the same thing, no input in the serial monitor but the led did flash. At this point, I have no reason to think it is the HC-12. I am not a designer, but I can find my way around basic circuits. I am mostly a noob at writing code, though I understand what I read. Any help will be greatly appreciated.
Mitch
I am having trouble getting HC-12 modules working for a project. I plan to use several HC-12's with PIR sensors to make a long range wireless motion alarm system. Each unit will just transmit a number giving it an ID and triggering an alarm at the receiving unit. I began asking Mark Hughes about my problems in an earlier post of his but this has expanded to the point I need to start a new post. I am using a sketch Mark wrote for the HC-12 that also enables the controller to send AT commands. I did a cut and paste of his sketch. I also deleted and started over with a new sketch a few times now.
I have several arduinos(uno, 2560, knockoff nano's) that I have tried to use. I have a few different HC-12's from two different knockoff companies. I also am running the proper driver for the knockoff boards and had to update avrdude on a couple in order for them to be seen by the IDE.
I have connected some of the boards to a PIR or a DHT sensor and those read on the serial monitor as they should. I also looked for some sketch already written that I could use to test this besides Marks' but have found nothing yet. I think his is perfect thought for what I am trying to figure out as I need something going in and out of each board. I have also played with baud rates just to rule that out and ended with everything set at 9600. I may be leaving out some important facts. If so, let me know and I will get it up asap.
The problem I am having is that when data is sent, it does not show up on the serial monitor on the receiving end. I first noticed when I would send the AT command and the HC-12 would not return an OK. I contacted Mark through another thread yesterday and he made a couple of suggestions. His first suggestion was to connect the two micro boards together without the HC-12's. I did as he suggested and connected the transmit to the receive and the receive to the transmit. I started out using an uno and a nano. I got nothing this way in the serial monitor. I did see the receive led flash when I hit the send key going both ways. Next I tried a pair of nano's. I got the same thing, no input in the serial monitor but the led did flash. At this point, I have no reason to think it is the HC-12. I am not a designer, but I can find my way around basic circuits. I am mostly a noob at writing code, though I understand what I read. Any help will be greatly appreciated.
Mitch
Last edited: