wallpaper

Saturday, 31 March 2018

week 9

assalammuaalaikum ...

for this week i have to do 3 tasks .Below is the tasks given :

1)I have to give the reading of the accelerometer of the device using the application
2) i have to make the application read the longitude and the latitude on the current location of the device
3)I have to get the reading of the gyroscope of the device using application

For the first task i have to give the reading of the device's accelerometer by using application

accelerometer is a device that give the reading of the device that include 3 entries whosekeys are "x", "y", "z" and whose values contain device’s acceleration about the corresponding axes.This component that can detect shaking and measure acceleration approximately in three dimensions using SI units (m/s2). The sign of the acceleration values must be according to the right-hand convention in a local coordinate system (see figure below).

  • xAccel: 0 when the phone is at rest on a flat surface, positive when the phone is tilted to the right (i.e., its left side is raised), and negative when the phone is tilted to the left (i.e., its right size is raised).
  • yAccel: 0 when the phone is at rest on a flat surface, positive when its bottom is raised, and negative when its top is raised.
  • zAccel: Equal to -9.8 (earth's gravity in meters per second per second when the device is at rest parallel to the ground with the display facing up, 0 when perpendicular to the ground, and +9.8 when facing down. The value can also be affected by accelerating it with or against gravity.



so here is the coding on how to get the reading of the accelerometer from our device.
this is the interface that we are going to see on the screen right after the page been opened . so we have 3 rows and 2 columns . In this interface it will give us 3 reading on x axis , y axis and  z axis and the value of each axis been initialized to 0.00.The 'test' button is sed to get the t
reading of each axis if the device change in its direction.

label 4 indicates the reading that will be appeared in x axis .
label 5 indicates the reading that will be appeared in y axis .
label 6 indicates the reading that will be appeared in z axis .

so in this coding once we push on the 'test button' the reading from the accelerometer of each axis will be written in the label of each its representative .

so below is the result on the device if we run it


For the 2nd task i ave to give the reading of the latitude and the longitude of the device.So as we know in order to get the location of the user e have to know the longitude and the latitude of the user so in order to get it i am using the location sensor that already installed in apps  so this is the design of interface
 for this screen it will find and load our current latitude and longitude on the device.

In writing the coding I decided to get value when the device change its location .each time the device change its location , it will give the value of longitude and the latitude in label 2 and label 3 representatively.So here the simulation i have done on the real device .

for the last task i have to get the reading of gyroscope of the from the application but unfortunately the reading does not appear after a long waiting .

so here the interface of the apps and its coding . i hope that sir can help me with this problem





.

Thursday, 15 March 2018

week 7

assalammualaikum for this week i have been given 2 tasks which are :

1) i have to put all the components that we needed for sensor's part in a small box so i can place it on the glove .
2) design on how the apps will be looked for the user

for the first task

i have made some holes in order to place the usb , i soldered the box in order to make the holes .

so this is how the holes look so then the usb fit to be connected to the source power.

and this is the final look on what i have done

for the 2nd task i have design it so that it is friendly usable to the blind people

1)the disgnated apps first it will appear the loading screen with logo of the apps

2) there will be 2 options which is the first one to connect the bluetooth in order the sensor can be used and the other option will be the navigation side . these 2 options will be read by the apps so the user can choose the option and there will be a mic picture which is can be used by the user in order to choose the option

3) if the first option been picked it will appear a list of bluetooth device that available so then just choosed it .

4)if the 2nd option been picked it will give the user the page of navigation that can lead them to their desired location 

that is all my updates for this week.


Wednesday, 7 March 2018

week 6

assalammualaikum ...


tasks for this week are :


1) to make the apps more interactive so here the progress i have made :


this is the splash before entering the screen to connect the bluetooth

this is the screen where the connectivity of the device with the blue-tooth to transfer the data from the max-sonar sensor .


for the upcoming weeks i would like to innovate apps to become better and interactive application.



2.for the components i have to try the connection of the max sonar sensor to the analog pin and connect to the arduino and test it using bluetooth sensor. Unfortunotely i also have to adjust the coding according to the new connection on the analog pin 


*/

// These constants won't change. They're used to give names
// to the pins used:
const int analogInPin = A1; // Analog input pin that the potentiometer is attached to
const int analogOutPin = 9; // Analog output pin that the LED is attached to

int sensorValue = 0; // value read from the pot
int outputValue = 0; // value output to the PWM (analog out)

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}

void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
// map it to the range of the analog out:
outputValue = map(sensorValue, 0, 1023, 0, 255);
// change the analog out value:
analogWrite(analogOutPin, outputValue);

// print the results to the serial monitor:
// Serial.print("sensor = " );
Serial.print(sensorValue);
// Serial.print("\t output = ");
Serial.println();

// wait 2 milliseconds before the next loop
// for the analog-to-digital converter to settle
// after the last reading:
delay(200);
}

and after test it i found that the analog pin of the max sonar sensor also can read the data and sent it through bluetooth .