Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple library for using ssd1306 displays with the Raspberry Pi Pico and the pico-sdk.

License

NotificationsYou must be signed in to change notification settings

daschr/pico-ssd1306

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example vid

pico-ssd1306

Simple library for using ssd1306 displays with the Raspberry Pi Pico and the pico-sdk.

Usage

  • copyfont.h,ssd1306.c andssd1306.h to your project
  • see example

Documentation

Example

  • setPICO_SDK_PATH
  • gotoexample
  • mkdir build && cd build && cmake .. && make
  • copy thessd1306-example.uf2 to your Pico

Draw Images

The library can draw monochrome bitmaps using the functionsssd1306_bmp_show_image andssd1306_bmp_show_image_with_offset.

For converting an image to the supported format, you can do the following:

  • installImageMagick
  • useconvert you_image.png -monochrome your_image.bmp

For embedding your image, you can use tools likebin2c (included in thehxtools package on Debian).

Alternatively, you can you the version included in this repo:

  • go in thetools/ directory
  • make
  • usage:./bin2c your_image.bmp your_image.h

You may also take a look at the example in theexample/ directory.

Fonts

You can also use or own fonts when drawing withssd1306_draw_char_with_font orssd1306_draw_string_with_font.The format is:

  1. a 1-D uint8_t array
  2. structure of the array:
    1. the first element of the array is theheight
    2. the second element of the array is thewidth
    3. the third element of the array is theadditional spacing between chars
    4. the fourth element of the array is thethe first ascii character, this array stores
    5. the fifth element of the array is thethe last ascii character, this array stores
    6. the following elements encode the pixels of the characters vertically line by line (see); a line can be encoded as more than oneuint8_t values, when theheight is greater than 8;please look atfont.h and the fonts in theexample/ directory

About

Simple library for using ssd1306 displays with the Raspberry Pi Pico and the pico-sdk.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp