This repository was archived by the owner on Apr 2, 2025. It is now read-only.
Open
Conversation
Callback function Error fix
Made it work with NodeJS 6.9.1 on arm7l (Orange Pi)
…tra space at end of displayed string.
…et and linespacing on wrap.
…alization was complete. Fixed bug in draw pixel wrapping due to incorrect limits check. Fixed bug in line wrapping when writing strings.
Fix setTimeout bug in busy check. Fix bug in writeString that adds ex…
I am using oled-i2c-bus to display an interactive menu on a SSD1306 0.96 128x64 OLED display attached to a Raspberry Pi Zero. The library works very well except for a few design flaws that can be easily corrected. The most important one is the display speed. By using _transfer function, the payload is segmented into individual bytes that are send each in a separate transaction. These transactions add the data byte (0x40) before the payload byte thus doubling the throughput. This has the unpleasant effect of one actually seeing the screen as it slowly refreshes. However, the payload bytes can also be sent in a burst, with a single leading data byte 0x40, bypassing _transfer function altogether and writing directly to i2c. Therefore the update time is halved. This doesn't sound as much in theory but in practice is a huge improvement as the eye sees an almost instant update as opposed to a slooooow refresh. Another improvement would be the actual clearDisplay function which is very complicated and slow. A clear display action should simply fill the buffer with 0x00 and if required, update the display.
Speed up page update on display and page clear
Added drawRGBAImage() method with examples and documentation.
fillRect specifies width and height not lower right coordinates
readme update
Avoid ENOENT exception due to missing I2C bus. Add a variable for setting the I2C bus, by default 1 as this is vaild for newer Raspberry Pi versions. On other platforms the value might be different, for example 0. Tested on Raspberry Pi 4 Model B. Signed-off-by: Leon Anavi <leon@anavi.org>
examples/clock.js: Failsafe checks for I2C bus
so that it works on the first time!
center vertically the clock
This change is backward compatible with the 1.0.11 version. I recently have constructed additional oled fonts from a site I found that had character sizes > 8 pixels. These fonts are useful for displays that are larger than 128x32 such as 128x64 or 128x128. I plan to add these fonts in the very near future to npm but before I do, I need a module that will support them. The current oled font character structure is such that each element in the array is a represents a column and bit values of the byte represent rows in the column. The current code supports font with character widths larger than 8 pixels but it does not support fonts with character heights larger than 8 pixels. This update includes a minor fix to word wrap (should no wrap the first word) and the changes to support fonts with character height larger than 8 pixels. Version number bumped to 1.0.12.
Enhancement to add support for larger fonts.
- restructure the code to accomodate swappable drivers - add a few of new APIs to draw an interactive and indicators icons * battery * bluetooth * wifi * image (a wrapper for `drawRGBAImage`) + add some "png" files for icons, numbers and logos - use `oled-font-pack` in examples and tests - allow errors to bubble up * except for `_waitUntilReady` function which might cause uncaught exception - bump package version to 1.1.0 - update readme to include instructions on enabling software I2C and the new APIs
feature: add support for sh1106
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added to: node_modules/oled-i2c-bus/oled.js (var config):
To be compatible with SparkFun's 64x48 OLED display (https://www.sparkfun.com/products/14532)