Great day ! I need help on my Arduino code. Here is my setup
LM35 connected to Arduino with output connected to Analog 0
Temperature computation work and serial monitor displays the correct reading
I want to connect the bluetooth to Android app(taken form the link) to display the temperature https://play.google.com/store/apps/details?id=appinventor.ai_Muhandi_prasetyo.LM35&hl=en
It displays for a few times but 98 % of the time it doesn't display it on the app. I'm thinking it may be on the code that i have
#include <SoftwareSerial.h>
#define RxD 6
#define TxD 7
float temp;
int temperaturePin = 0;
float temp1;
SoftwareSerial blueToothSerial(RxD,TxD);
void setup() {
Serial.begin(9600);
pinMode(RxD, INPUT);
pinMode(TxD, OUTPUT);
}
void loop() {
temp = analogRead(temperaturePin);
temp1 = temp * 0.48828125;
Serial.print(temp1);
delay(1000);
blueToothSerial.print(temp1);
delay(1000);
}
I just really want to make it simple. Kindly help