Ah! Does that mean I was on the "right" track with my original idea? Although it does sound very inefficient. I'm just looking for something simple that works on a breadboard and power supply situation, as we have a limited time to do the project.. unfortunately.
I liked your second example and it got me thinking...
Would it be better (in my case) to have loops; say, 0-9, each loop contains a different pause duration between lighting the LED and updating the display, I would have the main loop call a random number 0-9, which would go to each loop.
Let's see if I can mock it up...
MyWord var Word
MyByte var Byte
mainloop:
Random MyWord
MyByte=(MyWord//9)+1
If (MyByte == 1) Then
GoTo loop1
EndIf
If (MyByte == 2) Then
GoTo loop2
EndIf
If (Mybyte == 3) Then
GoTo loop3
;this continues to MyByte == 9
If (MyByte == 9) Then
GoTo errorloop ;error loop displays "E" on the LED display and waits for the user to press the reset button
Return
loop1:
High led1
pause 100
GoSub updatepins ;updates the display with the count, (not included yet in example)
Low led1
the loops would increase in pause duration of course. I hope I am on the right track here. I still have a couple days to complete this, but aside from one introduction to C# class, this is the first time I've had any experience with coding.
Bookmarks