pin 12 is piezo buzzer
@Brazilino my phone is paired
Perhaps there is an issue with the buzzer.
Set pin 13 as an output and add this to your code. Does the led blink with the 'b'?
if (incoming_value == 'b') {
tone(12, 2000);
delay(50);
noTone(12);
digitalWrite(13, HIGH);
delay(2000);
digitalWrite(13,LOW);
}
ok i'll try that
it's not flashing ![]()
I don´t think so, but any attempt is valid.
This suggests that the module isn´t receiving info from the phone. The unsuccesfull test with the terminal also suggests the same.
Did you try different baud rates? Have you used this module before? Unfortunately you can have a deffective one.
well, when i first wired up the module i didn't have a voltage divider on it because i didn't know i needed one. however, i realized i needed it from online tutorials recently. so could it be broken then? or do you think its baud rate? I've already tried 9600 and 34800.
When connected with the phone, what is the flash pattern of the indicator led on the module.
Do you see a pattern of 2 rapid flashes (on, off, on, off, takes ≈ 1 second) then a pause (off) of several seconds?
yes. 2 rapid flashes then a pause
The modules are pretty robust and many people run without the voltage divider on the module RX.
Everything is working correctly in my tests with the Morich Serial Terminal App.
How is the module being powered?
Can you attach of photo of the module wiring to the Arduino? If you are in actuallity connected as you have stated and you have tried different baud rates then it is possible the module is defective.
ok give me a sec
I see you are using a Micro. Note this from the software serial reference.
- Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).
With the Micro, you are better of to use Serial1 on the RX/TX pins instead of software serial. Serial1 is separate from the USB serial.
ok. where might i find a code example?
Micro pins
0(RX), 1(TX)
Just connect the module Tx to 0 and module Rx to 1.
Use Serial1.begin(9600) and change all reference to software serial to Serial1.
You can certainly try software serial on pins which are correct for the micro.
ok so instead of using bluetoothSerial.begin() use Serial1.begin?
Yes. Post your revised code if there are issues.
ok i'll try that
its working thanks!
Good one!
Another possible unrelated issues:
-
some Buzzers need ~70mA to work properly. Micro can give you 20 mA in a digital pin like the one you´re using (12). Even if bluetooth is working properly, the circuit as a whole maybe won´t.
-
I believe that part of your voltage divider in misconnected. One of your resistors seems to be attached to D15 port:

- What about all those crumpled pins? If you can, try to isolate just the HC-05 and the Micro to see if they work.
