Self driving cars are getting more and more popular as we develop and refine the technology needed. We believe that in the near future this new technology will be part of our daily lives and can be seen more and more driving in our streets.
Our product aims to simulate a real-world driving experience and introduces the user to some aspects of self driving cars.
We believe that such experience will help reducing the fears and distrust surrounding the current advancements. We want this technology to be accessible as we believe that anyone should be able to experience the benefits of a self driving car and an insight into the technology behind it.
This product works on two platforms: an Arduino car and a mobile application. The car can drive autonomously by following a line and avoiding obstacles. Using a mobile app, the user is able to manually control the car. The app allows the user to easily switch between autonomous and manual mode.
This ensures the car does not crash when in autonomous mode. Using the ultrasonic sensor, the car will always be a reasonable distance away from any obstacle. Once an obstacle has been detected, the car will drive around it and return to its course. It will be a challenge to ensure the car reacts quickly to an object in its path.
This feature allows the car to drive itself around a given course, staying on a line. Using an infrared sensor, the car will always remain on the track. Following sharp bends is beyond the capabilities of this car, so be kind and make a line for it that turns smoothly.
The app gives the user the opportunity to control the speed of the car, using pre-built controls. The range is from zero to maximum speed. This gives the user more control over the car. Be patient, the car follows the commands of the user in a reasonable time.
This feature gives the user manual control over the car. Using the app, the user can steer the car by adjusting the speed of the wheels on either side to turn. We did our best to ensure high user experience when it comes to steering. Some practice may be required to master it, but it would not be fun otherwise, would it be?
We emphasize high quality code in our work: we take a step beyond functionality and invest in maintainability. Master branch is protected by continuous integration platform that builds and tests the code when any change is applied. Additionally, unit test coverage report is issued. Mobile app coverage is continuously increasing. Arduino code tests are planned.
All you need to know can be found on our Wiki page.
- ST-4WD Smart Car Chassis 4WD Speed Car Magnetic Motor Single Layer For Arduino
- Ultasonic Sensor HC-SR04 (1)
- Arduino Mega 2560 REV3
- SmartCar Shield
- HC-O6 Bluetooth Module
- Funduino 3 Ch Infrared White/Black Line Detection Module MD-159
- AA Batteries (8)
- Odometer (2)
- Pin Jumpers
- Gyroscopes GY-50 L3G4200
The high-level overview of our two-tier system is depicted in the picture below:
We love open source software, so all of our code can be found in this repository. We encourage you to contribute to our project by opening a new issue, adding more functions or give a feedback. You are more than welcome to browse among the existing issues and fix some bugs!
Note: If you chose to contribute, you will not be able to push to master unless the code compiles, all of our tests pass and at least another contributing member approved your code. But do not let this discourage you, on the contrary: mess as much as you want, we're all safe!
- Assemble the vehicle hardware as shown in the image above
- Install the library from the Arduino IDE
- Connect the motors appropriately in the specified pins
- Upload & compile the code on the arduino.
- Hardware listed above
- Phone powered by Android (version 4.3+)
- Arduino IDE
- Android Studio
We ensure by using Travis CI that the code you find on Master branch always a usable version of our product.
To begin, clone this repository by opening your terminal, navigating to your favourite folder and typing:
git clone https://github.com/DIT112-V19/group-10.git
If you like our product and feel an unresistable urge to build the car from scratch, the best way for you is to visit the github repository of Dimitris Platis that has extensive documentation on the harware of this car and the library we used.
Once you have the hardware assembled, you will need to upload the master sketch to your car. If you have never worked with Arduino yet, here is our guideline:
-
Open Arduino IDE
If you don't have it yet, it's available from this website.
-
You will need to import the code to the IDE from the src folder of this project
This is the perfect moment to remember which folder did you clone this repository.
-
You will likely need to import the Smartcar Shield library
This step by step guideline will help!
-
Assuming that you have the USB cable for the Arduino board, connect the board to your computer
If it starts smoking or your computer dies, you did something wrong.
-
Hit Verify and Upload buttons (in this order)
That's about it! Let's move on to the settings of the app.
Our app is currently not available from any app store, but if you enjoy putting together an arduino car you will surely enjoy entering your smartphone as a developer.
All you need to do is to follow this step-by-step guideline:
-
Open your Android studio
If you don't have it yet, you can download from the Android Studio website.
-
Import project to Android studio from your favourite folder
-
Connect your phone via USB and enable file transfer
If you haven't set up developer mode on your phone yet, you can find the guidelines here.
-
Run the project from Android studio and select your phone from the given list
You're all set. Enjoy!
Before opening the app, make sure you paired the car with your phone through the phone's own Bluetooth settings. After opening the app and chosing Bluetooth connection you can chose the car from the list of paired devices.
The app allows you to use the car in two different ways. Choose autonomous mode to experience a self driving car or, choose manual mode to freely control it.
In this setting, the car will drive around freely, avoiding any obstacles in its path. AUTONOMOUS DRIVE - the car will start driving around. TRIANGLE - the car will drive itself in a pre-set triangle shape. LINE FOLLOWING - the car will follow a line on the ground, ensuring it is always centred.
Use the seek bar to control speed, based on five pre-made settings. Move forward, backward, left and right by pressing and holding the arrows. For a different experience, make use of the joystick by clicking JOYSTICK MODE. If you need to reconnect to the arduino, click the CONNECT TO CAR button on the app.