sujayjoardar
Newbie level 1
Sir/Madam,
i am trying to make a score board circuit for a gaming device, which has 3 holes, and each of the hole containing different point, i just want to calculate the total score at the end.It is a 10 ball game
each time it will drop onto a single hole and display a single value, but at the end of 10th ball, it will sum up the total score and display the total value.
i am trying to make a score board circuit for a gaming device, which has 3 holes, and each of the hole containing different point, i just want to calculate the total score at the end.It is a 10 ball game
each time it will drop onto a single hole and display a single value, but at the end of 10th ball, it will sum up the total score and display the total value.
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 #include<regx51.h> #define int s[k]={1 2 3}; sbit out1=P0^1; sbit out2=P0^2; sbit out3=P0^3; void main() { int i; int t=0; while(1) { for(i=0;i<10;i++) { if(out1==0) t=t+s[1]; else if(out2==0) t=t+s[2] else if(out3==0) t=t+s[3]; else t=t; } } }
Last edited by a moderator: