Assignment
Write an application that interfaces with an input &/or output device that you made, comparing as many tool options as possibleMy plan
This is my first time experiencing this subject. I am learning more about interfacing. And my plan is to create an application using MIT application developer. With this application, I will control an LED light.What is interfacing
Interfacing is a term used in electronics when different electronic devices are connected in order to move information from one device to another. ... The information passed through an interface may be very simple, such as a two-state signal, high or low, open or closed.there is differnt ways for interfacing such as wire,wifi,bluetooth...in here i am using HC-06 bluetoothHow am I interfacing
For the interfacing, I am using Bluetooth. The Bluetooth is well known as the wireless technology standard for exchanging data over short distances from fixed and mobile devices, and building personal area networks. I will use this method to program a project that I have.
The benefits of a bluetooth:-
Bluetooth allows high quality streaming.
Bluetooth allows creation of smaller sensors.
Bluetooth opens doors to a new generation of “connectionless” devices.
How to connect bluetooth in a circuit
Setting the HC-06 is as easy to a circuit board. All you need to know is the pin configuration. The HC-06 has 6 pins: wakeup, VCC, GND, TXD, RXD and State. Right now I will only deal with 4 pins, which are VCC, GND, TXD and RXD.the connection is connect VCC to VCC,GND TO GND, TXD TO RXD,RXD TO TXD.
For more details:- Designing the board / What are all the components used
Click Here
Application development
I am using the MIT application developer. It is found online for free and it is very easy to use for the beginners. The instructors gave some instructions on how to use this developer. And as for myself, I have searched on youtube about tutorials on how to develop applications using the MIT app interface. There are two sides of the app interface, one is user interface, and the other one is block. And I have started the application develoment, first i designed the user interface part, you can see the image below.
I finishe my design, the next stage is installing the application to my smartphone. Before the installing, I downloaded the MIT app interface companion from play store to my smartphone. When you are installing the application, connect same network into our system and phone. Then I opened connect --> AL companion that time we can see qr code i scanned and installed in my smartphone.
I connected bluetooth pin to microconroller arduino pin of 3 and 4. Moreover, i connected LED pin with microcontroller PB1. And i programmed IF the serial read a==1, blink LED, also a==0, off LED.
#include < SoftwareSerial.h>
SoftwareSerial mySerial(3, 4); // RX, TX
void setup() {
mySerial.begin(9600);
pinMode(PB1,OUTPUT);
digitalWrite(PB1,LOW);
}
void loop() { // run over and over
if (mySerial.available()) {
char a=mySerial.read();
if(a=='1'){
digitalWrite(PB1,HIGH);
}else if(a=='0'){
digitalWrite(PB1,LOW);
}
}
}
Download Files
Result
Demonstration Video