From 9ee60da4d692ba2e5a92f1b979e7624e08e80e45 Mon Sep 17 00:00:00 2001 From: Alan Wang <44191076+alankrantas@users.noreply.github.com> Date: Fri, 29 Jan 2021 09:28:07 +0800 Subject: [PATCH] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08cd358..9139c8e 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ See also [BBC micro:bit MicroPython documentation](https://microbit-micropython.readthedocs.io/en/latest/index.html#) -This is the collection of my notes, tricks and experiments on BBC micro:bit and MicroPython. This guide has bee upgraded for micro:bit V2 and may not be fully compatible for V1. +This is the collection of my notes, tricks and experiments on BBC micro:bit and MicroPython. This guide has bee upgraded for micro:bit V2; most of them are compatible with V1 but there would be limitations. ## Something About micro:bit's MicroPython @@ -384,7 +384,7 @@ def rainbow_cycle(): np[i] = wheel(rc_index & 255) np.show() sleep(led_delay) - cycle = (cycle + 1) if cycle < 255 else 0 + cycle = (cycle + 1) & 255 cycle = 0