From c5a81629d2d596c1ed606e4f3519cf1305c2cf81 Mon Sep 17 00:00:00 2001 From: cymplecy Date: Fri, 16 Oct 2015 18:39:28 +0100 Subject: [PATCH] Update core.py Add a corresponding fill routine to turn all pixels on --- codebug_i2c_tether/core.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codebug_i2c_tether/core.py b/codebug_i2c_tether/core.py index 5d94281..73c6c9d 100644 --- a/codebug_i2c_tether/core.py +++ b/codebug_i2c_tether/core.py @@ -78,6 +78,16 @@ def clear(self): """ self.set_bulk(0, (0,)*5) + + def fill(self): + """Sets all the LED's to on. + + >>> with CodeBug() as codebug: + ... codebug.fill() + ... + + """ + self.set_bulk(0, (31,)*5) def set_row(self, row, val): """Sets a row of LEDs on CodeBug.