boas pessoal,
tenho o arduino pro mini ligado (http://www.inmotion.pt/store/arduino-pro-mini-328-5v-16mhz) com o hc-06 bluetooth (http://www.inmotion.pt/store/hc06-serial-bluetooth-brick), com as seguintes ligações:
Arduino -------------- HC-06
GND ------------------ G(GND)
pin11 --------------------- V
D0(TX)-----------------RXI
D1(RX) -----------------TX0
e com o seguinte codigo no arduino:
#include <SoftwareSerial.h>
const int rxpin = 0;
const int txpin = 1;
const int bluetoothpin = 11;
SoftwareSerial bluetooth(rxpin, txpin);
void setup(){
pinMode(bluetoothpin, OUTPUT);
digitalWrite(bluetoothpin, HIGH);
Serial.begin(9600);
bluetooth.begin(9600); // initialize the software serial port
Serial.println("Serial ready");
bluetooth.println("Bluetooth ready");
}
void loop(){
if (bluetooth.available()){
char c = (char)bluetooth.read();
Serial.write(c);
}
if (Serial.available()) {
char c = (char)Serial.read();
bluetooth.write(c);
}
}
o meu problema é que nao consigo receber dados no arduino,pelo bluetooth, comigo apenas conectar-me com ele