Skip to content

Commit fb6b7f5

Browse files
committed
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)
1 parent 9ab45e9 commit fb6b7f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_CharLCD/Adafruit_CharLCD.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def write4bits(self, bits, char_mode=False):
229229

230230

231231
def delayMicroseconds(self, microseconds):
232-
seconds = microseconds / 1000000 # divide microseconds by 1 million for seconds
232+
seconds = microseconds / float(1000000) # divide microseconds by 1 million for seconds
233233
sleep(seconds)
234234

235235

0 commit comments

Comments
 (0)