Bluetooth HC-05 serial.begin not working

I am currently working on a project to display serial data from a remote control and to control servos, however, I have a problem while implementing serial.begin().

I can get clear serial output data if I delete the Serial.begin line, however the servos would not work. However the attached code with the Serial.begin(9600) line does not work with the BTserial.begin(9600) and the serial output results will become a bunch of nonsense. I am kinda new to arduino so i hope some of you guys out there can help out. Thanks!!

SensorBluetooth.ino (1.34 KB)

Which Arduino do you have? Most (all?) use pins 0 and 1 for hardware serial, so they're not available for use for software serial. Try some other pins.

Thank you for your reply, I am using an Arduino UNO with a sensor shield v5. The pins i am using for the TX and RX are the ones on the bluetooth column. Should I be using other pins to test it our instead?

paklai:
the ones on the bluetooth column.

If by that you mean the pins I circled in this pic, you will need to check the schematic of the shield to see where they connect to the Uno, and or use your ohm meter to check that. If they go to pins 0 and 1 that would be crazy, since as wildbill says, those are the hardware serial pins. There are 6 pins in that "bluetooth column"- I wonder what they all do?

ss5_bt.GIF

paklai:
Should I be using other pins to test it our instead?

Yes.

Curious to know why you're using the shield? Presumably to make it easier to connect and power the servos?

ss5_bt.GIF