Interface and Application Programming | Week 14

Week Content

I have checked various interface week from fab academy and I founf RGB Control with BLuetooth would be connected to my Final Year Project.

From Youtube Video I started learning MIT App Inventor and designed a Application to control LED.
Its simple to make Apllication in MIT app Inventor.
For interface and programming week, I tried to communicate my satsha board to the bluetooth HC-05 via software serial communication.
Design of My satsha is as follows.
For the User interaction, I designed an android application with the help of MIT app inventor which holds 3 buttons to control the RGB LED. First button turns on the red Light where second button turns on the blue light. The third button is for disable the LED from turning up(Since my green leg of LED was broken somehow).
Here is how I made App Screen

Block code of application





Apk file has been attached to files section below.
I connected my board with the fabisp to give necessary power and ground
By using below 328P Circuit I have connected to Phone via Bluetooth to control LED.

Communication with boards has been desigend with RX , TX.
MISO and MOSI from LED Counter Board will be connected to Digital Pins of Maker Bot.

Code for Bluetooth

	
#include <SoftwareSerial.h>
SoftwareSerial myS(6,5); // rx, tx
int r = 11;
int b = 12;
char c;
void setup() 
{
  myS.begin(9600);
  pinMode(r, OUTPUT);
  pinMode(b, OUTPUT);  

}

void loop() 
{
   if( myS.available() ){
     c = myS.read();
     if( c == 'r' ){
       digitalWrite(r, HIGH);
       digitalWrite(b, LOW);
     }
     else if( c == 'b') {
       digitalWrite(r, LOW);
       digitalWrite(b, HIGH);
     }
     else if( c == 'x'){
      digitalWrite(r, LOW);
      digitalWrite(b, LOW);
     }
   }
}
		
	

Video of Interface with Bluetooth

Files


^ Top