Skip to content

Instantly share code, notes, and snippets.


deroses/MQ136 Secret

Created November 5, 2014 23:24
What would you like to do?
simple example of code to connect MQ line of sensors with Android phone
#include <MeetAndroid.h>
MeetAndroid meetAndroid;
int sensorValue;
void setup()
Serial.begin(9600); // sets the serial port to 9600
void loop()
meetAndroid.receive(); // you need to keep this in your loop() to receive events
sensorValue = analogRead(0); // read input pin [alalog 0]
meetAndroid.send((sensorValue, DEC)); // send result to Android
delay(1000); // add delay
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment