Idea
My idea is to create a die (like the one used in playing board games). The number generated on the die is a random number between 1 and 6. The structure is made of a 3X3X3cm (max.) of transparent acrylic (maybe) or glass. Inside each face is attached a 7-segment display which are all connected together so that number displayed on each face is the same (unlike normal die). The number to be generated is decided by the program in the PIC. {I am thinking of using the randi() function which generates a random integer between two limits}. When the cube is held stationary it displays nothing on the faces (or maybe blinks). But when it is thrown and hits the ground, the accelerometer detects the impact and sends a signal to the microcontroller to start generating a number. The output of the microcontroller is connected to all the 7-segment displays.
Please suggest a PIC which has at least 1 analog input and enough ports to connect & 7-segment displays, as using our 16f877 would not be practical and it would be bulky. Also please suggest a suitable accelerometer available here. I have learned to use ADXL32x with PIC. Would that be suitable for this project? Please say if this project can be done with our present knowledge of the subject. My main hurdles are to include the 7-segment display, accelerometer and the PIC in the small cube. Also I would have to supply power to the components through button cells. Is this possible?
The use of this die can be made at casinos where unlike normal dice this cannot be tampered and generates a truly random number. Thus 'Loss Prevention' can be implemented.
Please give your suggestions and ideas.