TIce

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

TIce logo.jpg

Contents

Introduction / Inspiration

Do you know following situation? You are sitting around with your friends and you don’t know what to do.

Suddenly somebody has the idea of playing a classic board game (e.g. ludo (dt. Mensch Ärgere Dich Nicht)).

After looking for the game, you finally find it. But something very important is missing – the dice.

This is only one scenario, in which our universal dice tool called “TIce” for the eZ430-chronos can help you, as

its huge advantage is that this “dice” is very unlikely to be lost because it is fixed around your wrist ;-)


All in all, TIce is a universal dice tool which you can use in various situations.

Here are some examples:

  • Ludo (dt. Mensch Ärgere Dich nicht!)
  • Game of Life
  • Backgammon
  • Monopoly
  • Barricade (dt. Malefitz)
  • ...
  • The Dark Eye
  • Dungeons & Dragons
  • ...

Authors

When you have any questions, please mail to us: (TIce.chronos@gmx.de)

Features

Usage Introduction

Picture Description Picture Description
TIce1.JPG Step 1

Push ‘*’ to cycle through modes on top LCD line until “DICE” is displayed.

TIce2.JPG Step 2

Push ‘up’ to start the program.

TIce3.JPG Step 3

Choose the number of dice with ‘up’ and ‘down’.

TIce4.JPG Step 4

Push ‘#’ to confirm the number of dice.

TIce5.JPG Step 5

Choose the number of sides with ‘up’ and ‘down’ and confirm it with ‘#’.

TIce6.JPG Step 6

Shake the watch to generate random numbers.

TIce7.JPG Step 7

Select the displayed dice with ‘up’ and ’down’.

TIce9.JPG Step 8

Push ‘#’ to continue.

TIce9.JPG Step 9

Choose the mode with ‘up’ and ‘down’ and confirm it with ‘#’.

  • ESC => leave program
  • retry => try again with the same settings
  • info => enter analysis menu
TIceA.JPG Analysis Menu

Choose the mode with ‘up’ and down’ and leave the menu with ‘#’.

  • totl => sum of random numbers
  • low => min number
  • high => max number
  • avrg => average number

Functional Description

TIceFlow.jpg

TIce generates random numbers using data from the 3-axis accelerometer. The program gets the values from the sensor in constant intervals and adds the measurements of all axes. The value is stored in an array for further use if it exceeds 350. Thus the watch will only create random numbers if shaked.

The process endures always until the array is filled completely to achieve an approximately equal period of "rolling the dice". After this, the program gets further data from the accelerometer and compares them in constant intervals to detect the shaking stop. Until this occurs, sole values from the axes will be added to the contents of the array elements.

When you stopped shaking, the data of one element is divided by the number of sides for each dice and the remainder is increased by one. As a result of these operations, random numbers are generated by TIce.

Following chart shows the relative frequency of dice numbers.

Test conditions: Generate 25 times random numbers with 10 dice (6 sides) on the one hand with our TIce tool and on the other hand with a traditional dice cup.

Relative frequency.jpg

Download/Setup/SourceCode

The simplest way to get TIce on your chronos is to flash the .txt file via the Chronos Control Center (no disassembly required)!!


The other way:

  • ATTENTION: Use latest firmware version (revision b) [2]
  • Project properties -> C/C++ Build ->MSP430 Compiler -> Basic Options -> Set Debugging Model to “Symbolic debug for program analysis”
(After that no debugging is possible, change back to previous settings to debug)


Required Source Code Files

Leave a Comment

Comments

Comments on TIce


TIce said ...

Feel free to leave a comment or question!

--TIce 07:26, 9 December 2010 (CST)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox