From c4bf13bb59adff66aa8ca3fa1a3f4d29b55f4b3e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 1 Oct 2021 23:08:48 -0400 Subject: [PATCH] Speed up Kitty_Paw_Keypad --- Kitty_Paw_Keypad/code.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Kitty_Paw_Keypad/code.py b/Kitty_Paw_Keypad/code.py index 6076551f7..0447b50bf 100644 --- a/Kitty_Paw_Keypad/code.py +++ b/Kitty_Paw_Keypad/code.py @@ -101,9 +101,12 @@ key3_pressed = False # array for button states key_states = [key0_pressed, key1_pressed, key2_pressed, key3_pressed] +last_p = p while True: # default tile grid position - parrot0_grid[a] = p + if last_p != p: + parrot0_grid[a] = p + last_p = p # iterate through 4 buttons for i in range(4):