Go Down

Topic: Show Sensor Value on Android (App Inventor) (Read 1 time) previous topic - next topic

soaresdss

Hi, guys. I'm a brazilian user, so forgive my english. I have an Arduino UNO R3 with a Gas Methane MQ-4 sensor and a bluetooth module. I developed a app to turn on and off a LED. I configured the Arduino code with SoftwareSerial, set the RX and TX pins and it work. The wire connections is good.
After i built a app to show the sensor value. I tested the sensor in the Serial Monitor and it showed the value. So i just changed the "Serial.println" to "bluetooth.println". But don't work. The app freeze and the most strange is: when i turn off the Arduino, the app say that the connection was interrupted and just there show the sensor values on background screen. Sugestions?

App


Arduino Code

vxie13



this might not be very helpful...but why don't you try "blue.print(Valor_Gas)"  since i'm understanding "Valor_Gas" is the variable that has the data of the sensor read.

and i'm not sure if the right command is .print or .write when using bluetooth

:]

Go Up