Trying to port from u8glib to u8g2 #1526
Unanswered
HappyGrey16Plus
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys,
I have been trying to migrate this code to u8g2, which was created in u8glib so I can use it with a SDD1322 OLED display. (https://www.buydisplay.com/green-5-5-inch-arduino-raspberry-pi-oled-display-module-256x64-spi)
after going through the porting page (https:github.com/olikraus/u8g2/wiki/u8gvsu8g2),
I first changed the include file from #include "U8glib.h" to #include "U8g2lib.h"
Then I put my display type in the constuctor section:
U8X8_SSD1322_NHD_256X64_4W_SW_SPI u8x8(/* clock=/ 13, / data=/ 11, / cs=/ 10, / dc=/ 9, / reset=*/ 8);
Next I changed all the u8g. to u8g2.
Then I swapped out setColorIndex() for setDrawColor()
Next i changed out the old ug8 fonts for u8g2 fonts- setFont(u8g2_font_ncenB10_tr)
i'm at tyhis stage and im not sure what else to change.. Ill include the orginal code and the updated code to where im at now, any help or sugestions would be amazing!!
here is the original code before u8g2 amd the updated as my attemt to port to u8g2:
displaytalkORIGINAL.zip
displaytalkUPDATED.zip
Beta Was this translation helpful? Give feedback.
All reactions