DJ SmartCar is a dancing SmartCar controlled by an app that can also play music via Spotify. During these “unprecedented times” we wanted to develop a product that is fun and entertaining, while also showing off the capabilities of the SmartCar. When using our product, the user can choose between two modes: Dance without Music or Dance with Music. In Dance without Music, the user can make the car dance by choosing from four pre-programmed dance moves or a randomized sequence of these moves. In Dance with Music, the user connects to Spotify and the car will dance in a randomized sequence to the average tempo of the currently playing track. The car’s speed will change based on the tempo of the current track.
DJ SmartCar is a two-tier system that includes a SmartCar and an Android app. The app sends requests to the SmartCar server via WiFi. To play music and receive track tempo data, the app connects to the Spotify Web API. Please refer to Resources for a list of the hardware and software used during development and in the final product. To see the evolution of the DJ SmartCar software architecture, please refer to the Class Diagram Wiki page.
We have created a "fun" infomercial-style demo video. Please enjoy!
There are a few things you need to do before getting started:
https://github.com/DIT112-V20/group-06
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
.DOIT ESP32 DEVKIT V1
.carLogic.ino
.GYROSCOPE_OFFSET
and LEFT_PULSES_PER_METER
and RIGHT_PULSES_PER_METER
for the odometers and add the number to the variables in the carLogic.ino
sketch. In the Arduino IDE:
src/app
project in Android Studio../gradlew build --stacktrace
.BASE_URL
in RetrofitClient.kt
. To get the IP address, follow the steps below:
CLIENT_ID
for Spotify in SpotifyService.kt
.Endpoint.kt
, input the authorization on line 25. CLIENT_SECRET
variable is also available in SpotifyService.kt
for those who want to implement the base 64 encoding of the Client ID and Client Secret programmatically.Thank you for choosing the DJ SmartCar system!
We hope this product will bring you joy and entertainment for years to come. Before you can get started, there are a few things you need to do:
Now that you have downloaded the DJ SmartCar and Spotify apps, you can start enjoying the DJ SmartCar system!
The Dance with Music mode allows you to play music from Spotify right in the DJ SmartCar app. When pressing the Play button, the music will begin and your car will start dancing! When you press Pause, both the car and the music will stop. If you want to change the track, press Pause then change it in the Spotify app and return to the DJ SmartCar app to start dancing. When the track automatically changes, press Pause and then Play again to get the new tempo for DJ SmartCar to dance along to. If you press the home button while the car is dancing, the music and car will automatically stop and you will go back to the home screen. Pressing it while the music and car are paused will just take you back to the home screen.
You will see this screen once you have selected a dance move.
The Dance without Music mode features four unique dance moves: two-step, spin, shake, and macarena. The random button will make the car do these dances in a randomized order. After you have selected a dance move, press the Start button to make it dance until you press the Stop button.
To go back to the home screen, simply press the home button in the top right corner.
Thank you again for choosing the DJ SmartCar system, the most entertaining SmartCar on the market!