microsoft / pxt-adafruit

Microsoft MakeCode editor for Adafruit Circuit Playground Express
https://makecode.adafruit.com
Other
81 stars 77 forks source link

Update the 'Counter' example #1203

Closed ganicke closed 2 years ago

ganicke commented 2 years ago

Modify the example to count with the LEDs in a 0 - 9 fashion and show the tens digit only when it's > 0. Also, limit the counter range from 0 to 99.

The tens digit discriminator uses a simple check of i > 0 rather than adding the cntGT9 variable as suggested in #1202. Otherwise, the rest of the revised example is used.

Fixes #1202

NOTE: Adafruit builds are failing due to an NPM install problem.