How To Receive Multiple Sensor Readings From Your ARDUINO Into Your MIT APP INVENTOR 2 APP

The following tutorial will show you how to receive multiple sensor readings from your arduino board into you MIT APP INVENTOR  2 APP.

If you are using more than one sensor with your Arduino project you have found that it is necessary to send that data and display it on your app. To do this you will need to send all  the sensors data at one time, then split it apart and display it in the appropriate fields in your MIT APP INVENTOR APP. THIS IS HOW YOU DO IT!!!!!!

For A Video Tutorial On How To Do This Click Below, Otherwise scroll down for The other information….

Check us out on Facebook!

PARTS LIST:

#affiliate links#

DHT11

Photo Resistor

resistor

ARDUINO Board

HC-06

Logic level Converter

Bread Board

Jumper Wires

SCHEMATIC

The only thing that needs to be talked about in the schematic it the Photo Resistor, I used a 100KΩ photo resistor with a 50KΩ resistor set up as a voltage divider to read the current light level. If you use a different value photo resistor it will work just remember to use a resistor of half the resistance of the photo resistor in the voltage divider.

dht11_schem

Check out this link if your having problems with the code!

Why code you copy from a website does not work in your arduino IDE

THE ARDUINO SKETCH:

#include <SimpleDHT.h>
int pinDHT11 = 2;
SimpleDHT11 dht11;
#define light (A1)
int lvl;
void setup() {
Serial.begin(9600);
}

void loop() {

byte temperature = 0;
byte humidity = 0;
if (dht11.read(pinDHT11, &temperature, &humidity, NULL))
{
return;
}
lvl = analogRead(light);
Serial.print((int)temperature);
Serial.print(” C”);
Serial.print(“|”);
Serial.print((int)humidity);
Serial.print(” %”);
Serial.print(“|”);
Serial.println(lvl);
delay(5000);
}

Click here for a copy of the app!

MIT APP INVENTOR BLOCKS:

For some reason some of the blocks are not showing up but i think you will be able to figure out how this app is put together, the true and false blocks & some of the text blocks are not showing up but there data is being shown..

blocks

Check us out on Facebook!

Check out my other projects & tutorials here!