I'm kinda stuck here. I have the HC-05 Bluetooth module - from ebay - and I'm testing it to make sure it works. I uploaded the following sketch to the chip:
////////////////////////////////////////////////////////////////////////////////// // REMIXED BY: TECHBITAR (HAZIM BITAR) // LICENSE: PUBLIC DOMAIN // DATE: MAY 2, 2012 // CONTACT: techbitar at gmail dot com char INBYTE; int LED = 13; // LED on pin 13 void setup() { Serial.begin(9600); pinMode(LED, OUTPUT); } void loop() { Serial.println("Press 1 to turn Arduino pin 13 LED ON or 0 to turn it OFF:"); while (!Serial.available()); // stay here so long as COM port is empty INBYTE = Serial.read(); // read next available byte if( INBYTE == '0' ) digitalWrite(LED, LOW); // if it a 0 (zero) tun LED off if( INBYTE == '1' ) digitalWrite(LED, HIGH); // if it a 1 (one) turn LED on delay(50); }
I used three different bluetooth terminals on Android, as well as a TeraTerm terminal on WIN7, to check if the blutooth module works successfully. For some reason, all 4 get the line Press 1 to turn Arduino pin 13 LED ON or 0 to turn it OFF: but when I enter 1 in the terminals and send them to the module, the LED does not turn on.
Note: The LED is working. I claim that I have correctly connected all My serial RX and TX lines should work differently, I would not be able to download the sketch.
Is it possible that HC-05 is not working and cannot receive information? What can I do to check otherwise?
Thanks a lot!
source share