- Notifications
You must be signed in to change notification settings - Fork39
Simple library for using ssd1306 displays with the Raspberry Pi Pico and the pico-sdk.
License
daschr/pico-ssd1306
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Simple library for using ssd1306 displays with the Raspberry Pi Pico and the pico-sdk.
- copy
font.h,ssd1306.candssd1306.hto your project - see example
- onlinedocumentation
- see
ssd1306.hand example
- set
PICO_SDK_PATH - goto
example mkdir build && cd build && cmake .. && make- copy the
ssd1306-example.uf2to your Pico
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
- use
convert 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.
You can also use or own fonts when drawing withssd1306_draw_char_with_font orssd1306_draw_string_with_font.The format is:
- a 1-D uint8_t array
- structure of the array:
- the first element of the array is theheight
- the second element of the array is thewidth
- the third element of the array is theadditional spacing between chars
- the fourth element of the array is thethe first ascii character, this array stores
- the fifth element of the array is thethe last ascii character, this array stores
- the following elements encode the pixels of the characters vertically line by line (see); a line can be encoded as more than one
uint8_tvalues, when theheight is greater than 8;please look atfont.hand the fonts in theexample/directory
About
Simple library for using ssd1306 displays with the Raspberry Pi Pico and the pico-sdk.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors5
Uh oh!
There was an error while loading.Please reload this page.
