Arduino MKR1000 Serial Ports

Hello,

I currently have an Arduino MKR1000. I also have an HC-05 Bluetooth module. I wired the two together, and the HC-05 is visible on my device.

I was also able to pass this test that another "Youtuber" has made (I suggest you watch the video at 2x speed): [u]How to check Healthiness of HC-05 Bluetooth module (Recommended for Experts only) - YouTube
This proves that the HC-05 is healthy, and that data is flowing through the RX and TX pins.

The problem is when I connect the HC-05 to the Arduino. When I send information the HC-05, like "49" to turn on an LED or "48" to turn it off, it doesn't work; the LED stays off. I send this data through an app that I made, which simply sends "48" or "49". The code in the Arduino corresponds these messages to turn the LED on or off.

There are no errors in the code, and I have gone through the code many times.

Here are the connections that I use:

HC-05 ------> Arduino

+5V ------> 5V
GND ------> GND
TX -------> RX(13)
RX -------> TX(14)

Are you actually sending 48 when you meant to send 0 which mean off?
You should look at the ASCII table.

I send "49", which corresponds to "1" on the ASCII table. The Arduino code interprets "1" as turning on the LED.

Don't know.

I am sure the problem is in your code whatever it is.

The problem was in fact in my code, and it was that I was using Serial() instead of Serial1(). On the MKR1000, the RX and TX pins are on Serial1(), and Serial() is used for USB communication...

Posting this reply for anyone who has the MKR1000, and is using Serial Communication.

PushkarS:
The problem was in fact in my code, and it was that I was using Serial() instead of Serial1(). On the MKR1000, the RX and TX pins are on Serial1(), and Serial() is used for USB communication...

Posting this reply for anyone who has the MKR1000, and is using Serial Communication.

Have similar problem before, now figured out have to use Serial1 instead of Serial