I recently bought an Itead Bluetooth Shield v2.2. I connected it to my Arduino Uno and opened my App Inventor App. While I can connect to the BT shield(the status LED even lights up as if it was connected), I can’t send anything to the arduino (or it doesn’t recognize it). I tried writing a simple code to try to light up an LED (the built in LED on the board).
#include <SoftwareSerial.h>
SoftwareSerial mySerial(6,7);
int led = 13;
int val;
void setup() {
pinMode(led, OUTPUT);
mySerial.begin(9600);
}
void loop() {
if (mySerial.available()){
val = mySerial.read();
}
if (val == '1'){
digitalWrite(led, HIGH);
}
if (val == '2'){
digitalWrite(led, LOW);
}
}
As you can see (from the pictures below), I have the Rx pin connected to pin 6 and Tx to pin 7. Any help would be greatly appreciated and I’m sorry if I missed any info I should have given.