Problems:: Universidad Santo Tomás
Problems:: Universidad Santo Tomás
Problems:
1. Simulate the dice roll game. If the sum of the two dices does not match with a number placed by the
gambler on a numeric control, then throw the dices again. Show the sum of the two dices graphically
and count the numbers of attempts until the two numbers match. Finally, calculate the profits if the
player receives 5 USD at the start of the game and each dice roll cost him 1 USD.
Fn = Fn −1 + Fn − 2
UNIVERSIDAD SANTO TOMÁS
FACULTAD DE INGENIERÍA MECÁNICA
Asignatura: INSTRUMENTACION Y AUTOMATIZACION
Autor 1 (S.E.Vargas); Autor 2 (J.D.
Rodríguez);Autor3,(J,E.Torres)
Using shift registers on a While Loop, generate the Fibonacci numbers with a period of 1 second.
2. Generate a sinusoidal signal with fixed period of 2 seconds and configurable amplitude from 1 to 10.
Add green, yellow and red leds to indicate the actual value. If the signal instantaneous value is from
0 to 3, the green light should turn on. If the value is greater than 3 but lower than seven, the yellow
light will turn on. Finally, if the value is equal or greater than seven, the red light will turn on. Use
the Case structure.