riscosdave wrote:Hi Leo.
Hiya!
riscosdave wrote:
My Son bought me a PiGlow for Christmas. So I have to show him I can use it!
I have played around with your BASIC program and so to some observations.
The procedure, StopPiGlow, is not called as far as I can see. The main REPEAT loop doesn't terminate as UNTIL FALSE never holds.
Yes, this particular example loops forever. In theory I could call it from the error handler to ensure the PiGlow gets turned off when 'Escape' is pressed or similar. In reality I just had a different BASIC file that turned the PiGlow off, so I was using that during development!
riscosdave wrote:
As far as I can see, the procedure, SetLED, is not called anywhere.
That's true. Its something I added in the second revision of the code after reviewing the data sheet for the chip. Its not used by the main code itself, but I included it as an example of how a single LED can be set without affecting any of the others in case people took and modified the code. So in theory you could write a BASIC program that sets the red LEDs if you have new mails or your internet connection is down etc.
Leo