Lesson 14 - Bonus

More upgrades

You have made it to the final lesson of the workshop! Well done!

In this workshop, you have learned fundamental principles in programming and electronics.
Above all, you have built and programmed something that works in the real world; your own game to play!

The process you have learned is very similar to the process engineers go through when building smart devices and even robots.

The code you have created uses all the electronic components included in the kit, but of course, there is always a place for improvement!

Our team at PlayRobotics has spent extra time fine-tuning and improving the game. We only used blocks and settings that you have already learned in this workshop.

We understand that not everyone has time to make these tweaks and improvements to the code, but we still want you to enjoy an improved game experience. So, we are sharing our code here, and you can download it and upload it to your Arduino!

What did we add?

Displaying the time of the looser
During the workshop, we only displayed the winner’s time. In this improved code, we have added the looser’s time. (this required quite a few code changes)

Start a new round by pressing the start button (even if the previous round is not complete).

The code we made during the workshop required both cars to complete the race to start a new round. If one of the cars can not complete the track, the new code allows you to press the start button to begin another round.

Score board

Arduino will count the score of wins and losses. For example, if that left car won twice and the right won only once, the LCD screen will display 2:1.

The score will reset when you restart or turn off Arduino.

We have also added arrows to show who won the latest round.

Option to turn off the remote start

When using remote start, our sensor recognizes other remotes in your house and can start a race without you wanting to.

We have added a variable to the beginning of the code that lets you enable or disable remote start.

If the “enable remote” variable is set to 1, the remote start is enabled.
If the “enable remote” variable is set to 0, the remote start is disabled.

After changing this variable’s value, you will need to upload the code to Arduino.

We recommend going over the code and try to understand what changes we have made.

The code has many new blocks and settings and may look a little overwhelming at first, but all the changes use what you have learned during the workshop. Try exploring one new section at a time!

We are done!

Well done! You have completed the workshop!

It is always fun to complete challenges and achieve goals! But in this case, you have also gotten to know the exciting new world of programming and electronics.

We hope we have ignited your curiosity and that you will continue to investigate and enjoy these fields!

We will be happy to receive any feedback about how you felt during the workshop and hear what we can improve to make it better!

Thank you for playing with us!