{"id":9387,"date":"2014-11-06T12:50:34","date_gmt":"2014-11-06T01:50:34","guid":{"rendered":"http:\/\/legoeng.local\/?p=9387"},"modified":"2018-12-20T14:32:51","modified_gmt":"2018-12-20T03:32:51","slug":"naked-nxtev3-projects","status":"publish","type":"post","link":"http:\/\/legoeng.local\/naked-nxtev3-projects\/","title":{"rendered":"Naked NXT\/EV3 projects"},"content":{"rendered":"
\"Feeling<\/a>
Feeling a little naked…<\/figcaption><\/figure>\n

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 –\u00a0 just a \u201cNaked” NXT\/EV3 brick! If that sounds like you, then let\u2019s strip down the brick and have some fun!<\/p>\n

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\u2019t require robots to move, I would still prefer to use the USB cable with my brick.<\/p>\n

Here’s one idea for a naked NXT\/EV3 challenge…<\/p>\n

A game of chance and random adventure
\n<\/strong><\/h2>\n

Create a digital game of chance using only the NXT\/EV3 brick\u2019s on-board buttons, display and internal speaker.<\/em><\/p>\n

Keep score of the game (if appropriate) and provide the player with feedback at the end of a predetermined number of turns.
\n<\/em><\/p>\n

Advanced programming elements<\/strong><\/h3>\n

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 \u2018if\/else\u2019 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 \u2013 especially when problem solving them!<\/p>\n

The two sample programs I developed below in both NXT-G and EV3 (\u201cCoin Toss Game\u201d and \u201cRandom Dice Game\u201d) 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 \u2013 wasted many hours learning that lesson!).<\/p>\n

(Click for a bigger version of either image)<\/p>\n

\"Part<\/a>
Part of Coin Toss game (NXT-G)<\/figcaption><\/figure>\n
\"EV3<\/a>
Part of Coin Toss game (EV3)<\/figcaption><\/figure>\n

Videos of each game are shown below (for the NXT only). I really hope you enjoy them and I\u2019m 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.<\/p>\n

Random dice game (NXT)<\/h3>\n