HC-05 Bluetooth with Arduino MKR1000

Hello,

I was working on a project with the MKR1000 and the HC-05 module.
I tested to see if the HC-05 module was healthy, and my module was healthy.

When I connected the HC-05 to the MKR1000, I wasn’t able to send any data/ get any data back. My aim was to first turn on the LED_BUILTIN over the phone. I made an app that sends either “48” or “49” when a button is pressed. These correspond to “0” and “1” as per the ASCII table. The Arduino code interprets the “0” as turning off and “1” as turning on the LED (code0.png). This didn’t work.

I then resorted to turning on the LED_BUILTIN light if the Serial.available>0 (code1.png). This didn’t work. This indicates that the Arduino is not sensing any data available at the serial ports.

I know that the data from the phone is traveling to the HC-05 module, as I have tested it. The problem is when I connect the BT module to the Arduino, the data is not flowing to the Arduino.

I suspect that there is something wrong with the RX or TX pins, or that I am not plugging them in at the right time; I read somewhere that you should plug in the RX and TX pins after uploading, as they are being used during the uploading. I was wondering if I have to plug it in during the uploading or after? I tried both but the code still seems to not work.

I have attached the fritzing file (fritzing_arduino_bluetooth.png), my Arduino code, and also the Code for the app I made.

Please feel free to ask any questions, as there may be a few important things that I may have forgotten to mention.

code1.PNG

code0.PNG

app_code.PNG

cross post

don't regurgitate the same thing ; sheesh

.