HCuOLED library for SSD1307 & SH1106 based OLED displays
-
- Posts: 30
- Joined: Thu Dec 31, 2020 1:22 pm
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
Happy to make the contribution, your after sales support is excellent, giving a "tiny" thing back is a way of saying thanks.
I like how you have added the character spacing to the font file. A very sensible approach that makes its easy to tweak.
Now, with all the software issues resolved, I need crack on and build a housing for them so they can be installed on my model railway.
I like how you have added the character spacing to the font file. A very sensible approach that makes its easy to tweak.
Now, with all the software issues resolved, I need crack on and build a housing for them so they can be installed on my model railway.
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
Cheers for that. Please feel free to post a picture when it's finished I'd love to see it.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
-
- Posts: 3
- Joined: Fri Mar 19, 2021 6:13 pm
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
Code: Select all
Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "WeMos D1 R1, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from C:\Users\\Documents\Arduino\libraries\HCuOLED\HCuOLED.cpp:46:0:
C:\Users\\Documents\Arduino\libraries\HCuOLED\fonts.h:3117:1: error: cannot convert 'const uint16_t* {aka const short unsigned int*}' to 'const unsigned int*' in initialization
};
^
C:\Users\\Documents\Arduino\libraries\HCuOLED\HCuOLED.cpp: In static member function 'static void HCuOLED::SetFont(const byte*)':
C:\Users\\Documents\Arduino\libraries\HCuOLED\HCuOLED.cpp:841:19: error: cannot convert 'const unsigned int* const' to 'const uint16_t* {aka const short unsigned int*}' in assignment
_FontDescriptor = Terminal_8ptFontInfo.Descriptors;
^
C:\Users\\Documents\Arduino\libraries\HCuOLED\HCuOLED.cpp:847:19: error: cannot convert 'const unsigned int* const' to 'const uint16_t* {aka const short unsigned int*}' in assignment
_FontDescriptor = MedProp_11ptFontInfo.Descriptors;
^
C:\Users\\Documents\Arduino\libraries\HCuOLED\HCuOLED.cpp:853:19: error: cannot convert 'const unsigned int* const' to 'const uint16_t* {aka const short unsigned int*}' in assignment
_FontDescriptor = LCDLarge_24ptFontInfo.Descriptors;
^
C:\Users\\Documents\Arduino\libraries\HCuOLED\HCuOLED.cpp:859:19: error: cannot convert 'const unsigned int* const' to 'const uint16_t* {aka const short unsigned int*}' in assignment
_FontDescriptor = sharpsharp_6ptFontInfo.Descriptors;
^
C:\Users\\Documents\Arduino\libraries\HCuOLED\HCuOLED.cpp:865:19: error: cannot convert 'const unsigned int* const' to 'const uint16_t* {aka const short unsigned int*}' in assignment
_FontDescriptor = sharpsharp_5ptFontInfo.Descriptors;
^
exit status 1
Error compiling for board WeMos D1 R1.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
I've attached an updated version (V0.8) of the library to this post. Unfortunately as it's the weekend I can't test it but hopefully this should fix the problem. Can you give it a try and let me know if it's fixed and I'll add it to the first post.
You do not have the required permissions to view the files attached to this post.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
-
- Posts: 3
- Joined: Fri Mar 19, 2021 6:13 pm
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
hey! great library btw, is there any way of retrieving the state of a pixel? by that i mean if pixel at y:13 x:10 is on/off. thanks! I assume it can be retrieved from the buffer but I don't know how.
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
Thanks. As it was an simple addition to the library I've attached an updated version (still V0.8) which includes a GetPixel() function.....
Get the current state of a pixel where:
X is the x axis coordinate of the pixel
Y is the Y axis coordinate of the pixel
Returns: A boolean value representing the state of the pixel at coordinate X,Y
Again, if you could let me know if it works and I'll get this updated version added to the first post.
Code: Select all
HCuOLED.GetPixel(X, Y);
X is the x axis coordinate of the pixel
Y is the Y axis coordinate of the pixel
Returns: A boolean value representing the state of the pixel at coordinate X,Y
Again, if you could let me know if it works and I'll get this updated version added to the first post.
You do not have the required permissions to view the files attached to this post.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
-
- Posts: 3
- Joined: Fri Mar 19, 2021 6:13 pm
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
thanks for all the great help! the v8 library works now, i can display on my 0.66" OLED fine and the get pixel function works as well, keep up the good work.
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
Thanks again for confirming. I've now added this version to the first post.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.
-
- Posts: 30
- Joined: Thu Dec 31, 2020 1:22 pm
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
Hi,
I'm picking up this project again.
I was hoping to invert a character but I can't get the DrawMode function to invert. It's not a mission critical requirement, just a nice to have, so if the functionality is broken, don't spend time fixing it on my behalf.
tried
also tried it around the whole buffer creation to see if it would invert everything, it didn't.
I'm picking up this project again.
I was hoping to invert a character but I can't get the DrawMode function to invert. It's not a mission critical requirement, just a nice to have, so if the functionality is broken, don't spend time fixing it on my behalf.
tried
Code: Select all
HCuOLED.DrawMode(INVERT);
HCuOLED.Print(4);
HCuOLED.DrawMode(NORMAL);
-
- Posts: 30
- Joined: Thu Dec 31, 2020 1:22 pm
Re: HCuOLED library for SSD1307 & SH1106 based OLED displays
Also...
How difficult would it be to scroll a line of text? Looking at the library it looks tricky, but do able.
Again, not asking you to provide the code, I'll have a go, but if you think its in the too difficult category then I'll know not to waste effort on it.
cheers
How difficult would it be to scroll a line of text? Looking at the library it looks tricky, but do able.
Again, not asking you to provide the code, I'll have a go, but if you think its in the too difficult category then I'll know not to waste effort on it.
cheers