For some projects, you might prefer to offer your students more time to learn advanced programming, and spend less time building. That means no extra LEGO pieces, motors, or external sensors – just a “Naked” NXT/EV3 brick! If that sounds like you, then let’s strip down the brick and have some fun!
The only hardware required for this activity is the brick itself. You may not even need the USB lead, since most computers can connect to the brick via Bluetooth. Personally, for group activities that don’t require robots to move, I would still prefer to use the USB cable with my brick.
Here’s one idea for a naked NXT/EV3 challenge…
A game of chance and random adventure
Create a digital game of chance using only the NXT/EV3 brick’s on-board buttons, display and internal speaker.
Keep score of the game (if appropriate) and provide the player with feedback at the end of a predetermined number of turns.
Advanced programming elements
Essentially, the task combines two advanced programming elements: Variables and Logic Switch blocks. Variables are useful for keeping score of a game, tracking the number of attempts or goes, or comparing logic values. Switches are great on their own for ‘if/else’ statements, and can also be quite useful within themselves for enhanced coding and user options. When used together with other common blocks, variables and switches can provide users with a means to code interactive digital games that are simple, fun and highly satisfying – especially when problem solving them!
The two sample programs I developed below in both NXT-G and EV3 (“Coin Toss Game” and “Random Dice Game”) feature an assortment of Random, Variable and Logic Switch blocks. Both programs also incorporate the use of display blocks and wait-for brick buttons. Initially I was not intending for them to look so complex, and I tried my best to keep them to a basic functionality. The Coin Toss Game in particular became quite time-consuming working out how to keep track of my coin toss prediction and compare the result at the end. Logic variables became the solution (as opposed to numeric – wasted many hours learning that lesson!).
(Click for a bigger version of either image)
Videos of each game are shown below (for the NXT only). I really hope you enjoy them and I’m sure your students can use them as a springboard for more amazing and creative games. Please leave a comment or send a message if you would like any aspect explained in more detail.
Random dice game (NXT)
Coin toss game (NXT)
Sample programs (NXT & EV3)
Naked Brick Projects: nakedbrickprograms (zipped folder containing *.ev3 and *.rbt files)
Possibilities for naked brick programs involving chance include simplified forms of: roulette, craps, bingo, greedy pig, a reaction time, or snakes & ladders.
You could even write a program that generates a story randomly – so each time you run the program, you never know how the story will finish!
Latest posts by John Burfoot (see all)
- Harvey Mk II: Improved Quick EV3 Robot Build - 27 September 2018
- EV3 Sensors - 22 March 2018
- EV3 Simulator using RobotC: First glance at QEV3BotSim - 31 October 2016