Andriy Baranov
Published © GPL3+

Smartphone Controlled Lamp | Arduino + MIT App Inventor

Make smartphone controlled lamp using Arduino Uno, bluetooth module HC-06, and create Android App with MIT App Inventor.

BeginnerProtip1 hour20,623
Smartphone Controlled Lamp | Arduino + MIT App Inventor

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
HC-06 Bluetooth Module
×1
Arduino 2 Channel 5V DC Relay Module Solid State High Level
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

MIT App Inventor
MIT App Inventor
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)

Story

Read more

Custom parts and enclosures

Android App

Android App created with MIT App Inventor

Schematics

Schematic diagram

Wiring diagram

Wiring diagram (Fritzing)

Code

BT_Lamp_v1.0.ino

Arduino
#define lamp_Channel  13   		

int command; 			      //Int to store app command state.
boolean lamp = false;

void setup() {  
   	  pinMode(lamp_Channel, OUTPUT);
      Serial.begin(9600); 
  } 
  
void loop(){
  
if (Serial.available() > 0) {
	command = Serial.read();
	

if (lamp) {digitalWrite(lamp_Channel, HIGH);}
else {digitalWrite(lamp_Channel, LOW);}

switch (command) {

case 'L':lamp = true;break;
case 'l':lamp = false;break;
}
}
}

Credits

Andriy Baranov

Andriy Baranov

1 project • 293 followers

Comments