Git Product home page Git Product logo

oled-js's Issues

Color arg for writeString not working

The 'color' argument for the 'writeString' method is not working. Regardless of value, it always outputs as 1, never 0.

It looks like the arg 'color' is not referenced anywhere in the 'writeString' method

Scroll Size

Hi,

I would like to know if it's possible to have a scroll for text that are more longer that the screen size ?

Regards,

OLED SSD1306 - Layouts and mixing text and logo with auto size

Dear @noopkat

I 'd like to use your library to generate 1 or 2 or 3 or 4 lines in a 64x32 or 128x64 pixels picture using ssd1306.

Each line could have different fonts and sizes depending of the number of lines.

This a layout I am looking to do by using javascript or typescript to generate on the fly the png or bitmap to display to a oled display

TEXT264x32_PIXELS_PNG_OR_BITMAP_1_COLOR_DEPTH_AND RGB_8BITS.pdf

Otherwise nice on twitch. Success

Best Regards
Youssef

How to position a bitmap or png picture on the screen if not taking all the size of the screen

Dear @monteslu , @igorklopov , @noopkat , @psyrax , @rudacs

Nice library but how we could center a bitmap or position it if the size is less than the screen size?

I 'd like to position 6 icons (bmp or png) and position each one in a defined x,y position.

How to do that even to use to drawpixel command ?

And finally, is there a way to manage Layers that means I have a background picture, and some time I have popup like (Yes - No) ? And when selecting one of this option of the popup, Clear the popup without to reload the background picture ?

Best Regards

Season's greetings
Youssef

ssd1322 and othe chip support

hello, great work!!!
would it be possible to use different displays than the ssd1306?
i'm asking because i'm currently trying to connect an ssd1322 to my raspberry via nodejs.
i found a great library, but its just for c... (https://github.com/olikraus/u8glib)
it would be amazing to port this to nodejs to your oled-js module.
best regards

paul

What is the expected refreshrate for I2C OLED screens?

I'm getting the similar effect as the mentioned "SPI screens" slowness on a I2C OLED screen.
I have a small 128x64 OLED screen, but the refresh rate is very very poor. You can even see when the screen refreshes to the newest value.

Also I found a bug with oled.writeString method. Something is not properly implemented, because if I call the method 10-20 times in a second, I get an error:

(node:17852) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 201 I2C-reply-60-0 listeners added to [Firmata]. Use emitter.setMaxListeners() to increase limit

Questions here:

  • what is the expected rate of update we can achieve
  • why do I get the error (is it a bug?)
  • if the update is limited and takes time to execute, wouldn't it be wise to return with a promise, so we can call the next update when the previous screen update finished? There is no way of knowing at the moment when the update has finished

Cannot read property 'send' of undefined [IO plugins support]

Error:

>> /tmp/remote-script/node_modules/tessel-io/lib/index.js:842
      state.i2c[address].send(buffer);
                        ^

TypeError: Cannot read property 'send' of undefined
    at Board.i2cWrite (/tmp/remote-script/node_modules/tessel-io/lib/index.js:842:25)
    at t._transfer (/tmp/remote-script/node_modules/oled-js/oled.js:1:2777)
    at t._initialise (/tmp/remote-script/node_modules/oled-js/oled.js:1:2133)
    at new t (/tmp/remote-script/node_modules/oled-js/oled.js:1:1652)
    at t.<anonymous> (/tmp/remote-script/index.js:1:226)
    at emitNone (events.js:72:20)
    at t.emit (events.js:166:7)
    at nextTickCallbackWith0Args (node.js:420:9)
    at process._tickDomainCallback (node.js:390:13)

Code:

var five = require('johnny-five'),
    Oled = require('oled-js');
var Tessel = require("tessel-io");
var board = new five.Board({
  io: new Tessel()
});
board.on('ready', function() {
  

  var opts = {
    width: 128,
    height: 32,
    address: 0x06
  };

  var oled = new Oled(board, five, opts);
  var font = require('oled-font-5x7');


oled.drawCircle(30, 10, 5, 1);
oled.update();

});

Hello, please tell me how to solve this problem

Unable to utilise oled-js

I'm unable to render text on the screen. For some reason, my code appears to not clear the screen properly and finish the rendering.

const five = require('johnny-five');

const board = new five.Board();

const Oled = require('oled-js');

const font = require('oled-font-5x7');

board.on('ready', function () {
  const opts = {
    width: 128,
    height: 64,
    address: 0x3C
  };

  const oled = new Oled(board, five, opts);
  oled.clearDisplay();
  oled.setCursor(1, 1);
  oled.writeString(font, 1, 'Cats and dogs are really cool animals, you know.', 1, true, 2, true);
  oled.update();
})

I used this code and confirmed the LCD works fine but when I run the StandardFirmataPlus on the board and execute the above JS code this is what I end up with – the Hello World doesn't seem to get cleared and the text seems cut off as if the screen dimensions are smaller than 128x64.

image

Can someone say what I'm doing wrong?

ES6/ES7?

Are you looking to port this library to newer js standards?

Using the display with a raspberry Pi

I really like your API for the oled displays. Unfortunately I am not able to use it yet as I am using my Johnny Five either with a

  • ESP8266 (with Etherport-client) or
  • preferrer a Raspberry Pi (with rapi-io).

Is there any way to figure out the correct address for the display? Would really help me out.

text justifying

this is definitely a nice to have, and not required for release.

SPI resources

Hi @noopkat,

I came across your oled-js project.
I'm trying to draw on a e-ink display module which requires SPI.

I was wondering if you can point me to the best resources you managed to find on how to use SPI as efficiently as possible. For your project, you mentioned it is slow when using SPI. (I'm trying to make a second e-ink display HDMI monitor).

It's also nice to see a fellow Melburnian make it to the big leagues in the US. Keep up the good work! I wouldn't be surprised if I've actually met you at a meetup or two either.

Regards,

PJ

draw immediately

  • add last arg in drawPixel, fillRect, drawBitmap, drawLine, writeString (default true)
  • draw immediate will take effect with each above method call, unless false is passed in
  • if false is passed in, update method is required when done manipulating buffer
  • when above methods are called, set start col and page, send pixel, then update the buffer to clean state (to match).

Question: How to create new fonts

Hi.

I would like to use a slightly larger font (monospaced would be good enough for me). However, doubling the 5x7 font is too large. So, I am wondering how can I create new fonts files? Do you have a tool to create the json file and what is the source file format for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.