RACING ROBOT CAR DAY 3
DAY 3
Today we did the following as planed:
- Uploaded program onto the chip
- Create an app to control the car via a mobile phone.
GOAL 1
This goal took us loads of research, due to not programming in this language before. We watched quite a few tutorials to ensure we are uploading this code correctly and it did take us multiple attempts.
Our code is as below:
The code basically takes an input value from the Bluetooth, and depending on the value (1 or 0), it will move or stay still. If the incoming value is 1 (correct answer), then the car will move forward vice versa.
GOAL 2:
- Create an app to control the car via a mobile phone.
Top create the app, we used 'MIT app inventor' online. This made it much easier to create the app, due to the abstraction of the website.
This app allows us to connect the app to the Bluetooth and answer questions from the app accordingly.
The incoming value in the above code, will be the value returned from the app when a question is answered.
We had a lot of difficulty as this app works on android only, but everyone in our team has an iPhone! However, one of the other advisors were able to help us with this by allowing us to borrow their mobile device to test this out.
It is not yet working as expected, as we are currently having trouble with the Bluetooth connection between both devices.
The Bluetooth connection works as expected without coding in the questions into the app, but for some reason, when we add in the questions, this stops working. At the moment, we are currently looking into why this may be, and what mistakes we have possibly made during the implementation.
We further tested the connection and noticed that the wheels would only move sometimes, but not all the time.
We had assumed that this was because of the batteries, and so we decided to connect the Multi-Meter to the car directly, in replacement of the batteries.
This worked every single time, even from much further distances!
We have therefore acknowledged that the batteries may need replacing, as the voltage supplied by the batteries was equivalent to the voltage supplied by the Multi-Meter and so this was not the issue.

Comments
Post a Comment