Apps and online services

About this project

It's a problem to take the car in reverse and many time people bump it into other cars or garage wall. My dad often ask me to assist him while parking car. But, what if you are driving alone and there is no one to assist you? There comes the Arduinomated car parking assistant which will work on 1Sheeld+ and Ultrasonic distance sensor which will tell you about how much distance is there between your car and obstacle without seeing backwards with a voice assistant; means you don't have to look backward nor into a screen.

What is 1Sheeld?

1sheeld is a stackable Arduino UNO shield used by in projects which can substitute and many components and make the work easy for wireless connections between an smartphone and the Arduino using a single App available for Android and iOS both.

Tech Specs:

1Sheeld+ uses a standard HM-10 Bluetooth low energy adapter (BLE 4.0)

7.37 MHz operating frequency

Range up to 30 feet

Communicates with Arduino using UART

Supports iOS versions starting 9.0 and up.

Supports Android versions starting 4.3 and up.

Note: I am assuming that almost all the people know about the Ultrasonic Distance sensor.

Building Connections

Connections for this are very easy.

Put the 1Sheeld+ on the Arduino Mega2560.

Now, connect the VCC and GND pin of the distance sensor with the 5 V and GND pin of Arduino respectively.

Connect echo pin to pin 11 and trigger pin to pin 13.

Download and Install the 1Sheeld App in Smartphone

Download the 1Sheeld app from the Playstore/iTunes.

Connect your smartphone to 1Sheeld via Bluetooth.

Select Text to Speech in the App.

Uploading the Sketch to Arduino

Remember to install the 1Sheeld library before you start uploading the code. Click here to get the library. You can also install it through Arduino IDE. Go to Sketch > Include Library > Manage Libraries > Enter "One Sheeld" and install the library.

Go to Tools > Boards > click on "Arduino Mega ADK".

Upload the sketch to the board.

Testing and Calibration

Now, test the project by using a book, cardboard, etc as an obstacle and connect the App with 1Sheeld.

Change the delay time in delay() function to calibrate the speech time.

Now, you can put it on the bumper of your car with tape and test it.

Sketch uses 27104 bytes (10%) of program storage space. Maximum is 253952 bytes. Global variables use 2063 bytes (25%) of dynamic memory, leaving 6129 bytes for local variables. I would suggest you to use Mega or higher board. UNO don't have much memory!

Have a good day! Try it and comment, respect and follow!

Code

Sketch - Car ParkingC/C++

/******************************************************************************** 2017 Techduino This sketch reads a HC-SR04 ultrasonic rangefinder and returns the distance to the closest object in range. To do this, it sends a pulse to the sensor to initiate a reading, then listens for a pulse to return. The length of the returning pulse is proportional to the distance of the object from the sensor. The circuit: * VCC connection of the sensor attached to +5V * GND connection of the sensor attached to ground * TRIG connection of the sensor attached to digital pin 13 * ECHO connection of the sensor attached to digital pin 11********************************************************************************/#include<OneSheeld.h>#define CUSTOM_SETTINGS#define INCLUDE_TEXT_TO_SPEECH_SHIELDcharcharValue[4];//charVal variable stores the words which are to be spokenvoidsetup(){OneSheeld.begin();//starts the 1Sheeld}voidloop(){inttrigPin=13;//trigger pin connected to intechoPin=11;pinMode(trigPin,OUTPUT);pinMode(echoPin,INPUT);longduration,cm;// Read the signal from the sensor: a HIGH pulse whose// duration is the time (in microseconds) from the sending// of the ping to the reception of its echo off of an object.duration=pulseIn(echoPin,HIGH);// convert the time into a distancecm=duration/29/2;dtostrf(cm,4,1,charValue);if(cm<70){TextToSpeech.say("Stop! Your are too close! Distance is ");delay(3500);TextToSpeech.say(charValue);delay(1300);}elseif(cm>70&&cm<170){TextToSpeech.say("Keep it slow! Distance is ");delay(3500);TextToSpeech.say(charValue);delay(1300);}elseif(cm>170){TextToSpeech.say("Distance is ");delay(1500);TextToSpeech.say(charValue);delay(1300);}}