Closed Romonaga closed 1 year ago
Hi @Romonaga
Thank you for using my library. Happy that it works for you.
I left out scrolling since if you read the datasheet, you can see that the scrolling part is just a bunch of I2C commands that can be sent out using one of the API calls for the I2C. But yes, to perform a scroll you have to send the same command several times to be able to scroll as much as possible.
I have not tested it. Would you be kind enough to send me a diff
on your code that you have added. You can attach it to this issue. I can then test it out and see if I can implement scrolling and add it to the library quickly.
Thanks.
Here is a pull request that you can see the changes in. Please feel free to reject it once you seen my hack.
Support for scrolling has been added in latest commit 9d62b38ce2ad0ae6dbb4cc7b4f4c39b902fa7cce
The example now shows how to use the 4 types of scrolling correctly. It works on my Raspberry Pi with the SSD1306 OLED chip.
Thank you very much, will love to see how to do it correctly now.
Thanks for this lib, it is faster and way better than what I cobbled together. However, I noticed it does not have support for scrolling text, something I would like to have.
I have added this myself, while it works, I am not sure I did it correctly as the packets look different than yours.
I followed the logic in ssd1306_i2c_internal_get_cmd_bytes and I added 2 new cmds. Here is an example of one. The only way I would get it to work was by stuffing the Right Scroll command in cmdbuf[0..1] Thank you for considering this request.
case SSD1306_I2C_CMD_RIGHT_HORIZONTAL_SCROLL: cmdbuf[0] = 0x26; cmdbuf[1] = 0x26; cmdbuf[2] = 0x00; cmdbuf[3] = 0x00; cmdbuf[4] = data[0]; cmdbuf[5] = 0x0F; cmdbuf[6] = 0x00; cmdbuf[7] = 0Xff; sz = 8; break;