F
The assignment for this week is to write an application that interfaces with an input &/or output device that I made,
First I Studied about different network protocols like WIFI/WIMAX Protocols,Bluetooth protocol,TCP/IP model etc. finally i decided to use Bluetooth protocol v2.0. I choose HC-05 Bluetooth Module for this, it is a commonly used bluetooth module .
Specifications :-
Modes of operation :-
        This have two modes: master and slave. You can set the module mode (master or slave) of the device by AT commands
In this week I am going to use two IR transceiver because in my final project I am using IR LEDs to detecting motion of finger , so this is an important part of my final project.
The IR transmitter LED transmits continuous IR rays , when obstacles come near to IR transmitter LED IR rays reflected back . Due to this reflection, the amount of IR rays received by an IR receiver LED is increased . An IR receiver LED output terminal varies depending upon its amount of receiving of IR rays
For this I design a board with two IR transceiver and an ATtiny44 for processing the values from IR receivers ( show the schismatic and board design in my electronics design week / input device week )
Obtaining readings from the sensors
Here I am using two IR transceivers used for the movement detection .For Obtaining maximum and minimum readings from the sensors, connect the board to my computer using FTDI cable. Then continuously read IR receiver value using "analogRead" command in Arduino and use serial monitor to show the range of values
Using this program I got the maximum value from the sensor "900" ( when the finger very close to the sensor ) and minimum value "0" ( finger away from the sensor )
Programing the board
Then make a program for the finger movement detection . Here I using two IR sensors modules (sensor 1 and sensor 2) , if the finger is first above the sensor 1 input value to microcontroller I/O port of sensor one is 900 and sensor two is 0 , this time sent a value (1 or move left or play) via Bluetooth vice versa sensor two is 900 and sensor one is 0, this time another sent a value (0 or move right or pause )
Download the program
Build application with app inventor
I desired to build an android application for pause and play control using app inventor
What is MIT App Inventor?
MIT App Inventor is an innovative beginner's introduction to programming and app creation that transforms the complex language of text-based coding into visual, drag-and-drop building blocks. The simple graphical interface grants even an inexperienced novice the ability to create a basic, fully functional app within an hour or less.
Then I start to write program when the value receiving trough Bluetooth is "0" then start the video player
or receiving trough Bluetooth is "1" then stop the video player .show below my code
Code:
Application user interface:
Application user interface on mobile :
I pulished my app in MIT App Inventor Gallery ai2.appinventor.mit.edu/?galleryId=5127150418264064 you will get both source code and apk file from that link
View the application
Download .apk File
The result
Build application with Python
Over the last few months, I have learned how to program with Python. In this projects that I am working on python for collecting data through Bluetooth and view the collected data on computer's display
problem : I start to interface with my computer But I cant collect the sending data's from my board in to serial monitor. This proble i solve by Creating a bluetooth serial port
Creating a bluetooth serial port on ubuntu
After some searching I found pySerial. pySerial is an elegant piece of software that allows Python to send and receive data much like the Serial Monitor does
pySerial is available to download at https://pypi.python.org/pypi/pyserial
After download I install pySerial
To make sure that everything installed correctly open up Idle and type in 'Import Serial'. If no errors appears then everything is good to go
You can check the available ports with the line
Next, in Idle I create a new window and write a program to read data from Bluetooth