Coder Social home page Coder Social logo

OLED bitmap creation about crkbd HOT 8 CLOSED

foostan avatar foostan commented on June 27, 2024
OLED bitmap creation

from crkbd.

Comments (8)

joric avatar joric commented on June 27, 2024 6

Made this thing https://github.com/joric/qle

from crkbd.

jeffreykxiao avatar jeffreykxiao commented on June 27, 2024 1

@nicolai86 I was under the impression that since this uses a really similar OLED setup to the Helix's (ssd1306.h/c present in both repos), the instructions for Helix should apply here.

Give the Helix firmware guide a shot, if you haven't already.

from crkbd.

nicolai86 avatar nicolai86 commented on June 27, 2024

@jeffreykxiao Yes I tried, also with the python conversion scripts, but it didn't work unfortunately.

from crkbd.

foostan avatar foostan commented on June 27, 2024

but it didn't work unfortunately

Really?
Please show me error messages and logs.

from crkbd.

nicolai86 avatar nicolai86 commented on June 27, 2024

@foostan So I'm trying to use the helix FontConverter

When I run it on a 128x32 bmp file I get

python img2hex.py /tmp/aws.bmp
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
0x78, 0x3C, 0x3C, 0x3C, 0x1E, 0x1E,
0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
0x3E, 0x7E, 0xFC, 0xFC, 0xF8, 0xF0,
0xE0, 0x00, 0x00, 0x00, 0x00, 0x1C,
0xFC, 0xFC, 0xFC, 0xFC, 0xF0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0xF8, 0xFC, 0xFC, 0xFC,
0xFC, 0xFC, 0xF0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xF0, 0xFC, 0xFC, 0xFC, 0xFC, 0x1C,
0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8,
0xF8, 0xFC, 0x3C, 0x3E, 0x1E, 0x1E,
0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
0x3C, 0x3C, 0x38, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Traceback (most recent call last):
  File "img2hex.py", line 31, in <module>
    b = 1 if im[fontw*rowc+fontwc][fonth*(colmax-1)-fonth*colc+fonthc][0]<128 else 0
IndexError: index 128 is out of bounds for axis 0 with size 128

When I run it on a 64x32 bmp I get a similar error:

0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x18, 0x18, 0x0C, 0x0C, 0x0C, 0x0C,
0x1C, 0xF8, 0xF8, 0xE0, 0x00, 0x00,
0x78, 0xF8, 0xE0, 0x00, 0x00, 0x00,
0xC0, 0xF8, 0x38, 0xF8, 0xE0, 0x00,
0x00, 0x00, 0x80, 0xF8, 0xF8, 0x18,
0x00, 0x40, 0xF0, 0xF8, 0x9C, 0x0C,
0x0C, 0x0C, 0x0C, 0x18, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Traceback (most recent call last):
  File "img2hex.py", line 31, in <module>
    b = 1 if im[fontw*rowc+fontwc][fonth*(colmax-1)-fonth*colc+fonthc][0]<128 else 0
IndexError: index 64 is out of bounds for axis 0 with size 64

I've tried pasting the above matrix anyways into logo_reader.c but the display just remains black if I do that.

from crkbd.

nicolai86 avatar nicolai86 commented on June 27, 2024

I tried using the image data from logo_reader.c to generate an image with this: http://javl.github.io/image2cpp/
Maybe thereโ€™s a way but I can't get it to generate the image displayed on the OLED... :(

Same with monochrome and black-and-white bmps..

from crkbd.

nicolai86 avatar nicolai86 commented on June 27, 2024

Okay, slowly making progress. I can feed the font from glcdfont.c into http://javl.github.io/image2cpp/ , select 128x80 and read vertical
screenshot 2018-11-20 at 20 08 24

This means I probably have to modify my understanding on how this entire thing works: the font contains the glyphs which makup the image. This might help me figure out how to modify it...

from crkbd.

nicolai86 avatar nicolai86 commented on June 27, 2024

okay, http://teripom.x0.com/ can load the font from glcdfont.c and it allows me to edit it too. Downloading the modified glcdfont.c allows me to update the everything :) thanks!

from crkbd.

Related Issues (20)

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.