From fb6b7f591c1b2c352347bf0044ebc3765d450310 Mon Sep 17 00:00:00 2001 From: rogg Date: Sun, 2 Dec 2012 05:04:07 -0800 Subject: [PATCH] Update Adafruit_CharLCD/Adafruit_CharLCD.py In delayMicroseconds(), sleep(seconds) always equals 0 (get a lot of weird characters on LCD) in python v2 microseconds / 1000000 = 0 changed to : microseconds / float(1000000) so sleep(seconds) doesn't always equal 0 (get a lot of weird characters on LCD otherwise) --- Adafruit_CharLCD/Adafruit_CharLCD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adafruit_CharLCD/Adafruit_CharLCD.py b/Adafruit_CharLCD/Adafruit_CharLCD.py index bbb8955a..22060c94 100755 --- a/Adafruit_CharLCD/Adafruit_CharLCD.py +++ b/Adafruit_CharLCD/Adafruit_CharLCD.py @@ -229,7 +229,7 @@ def write4bits(self, bits, char_mode=False): def delayMicroseconds(self, microseconds): - seconds = microseconds / 1000000 # divide microseconds by 1 million for seconds + seconds = microseconds / float(1000000) # divide microseconds by 1 million for seconds sleep(seconds)