Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Update Adafruit_CharLCD/Adafruit_CharLCD.py - Weird Characters #13

Merged
merged 1 commit into from
Dec 3, 2012

Conversation

rogg
Copy link
Contributor

@rogg rogg commented Dec 2, 2012

In delayMicroseconds(), it's always sleep(0) in Python 2.x (get a lot of weird characters on LCD)

This is because x / y returns an integer, not a float in Python 2.x
changed to: seconds = microseconds / float(1000000)

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)
ladyada added a commit that referenced this pull request Dec 3, 2012
Update Adafruit_CharLCD/Adafruit_CharLCD.py - Weird Characters
@ladyada ladyada merged commit ee702e8 into adafruit:master Dec 3, 2012
@ladyada
Copy link
Member

ladyada commented Dec 3, 2012

! thanks, thats an annoying thing about python :(

@rogg rogg deleted the patch-1 branch May 23, 2014 02:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants