Hi guys,
I have the uOLED 128 G2 from the parallax website, here is the link:
http://www.parallax.com/product/28081
I currently have it connected to a propeller microcontroller, and I am using the "oLED-128-G2_v2.1" library to communicate with it. So far everything is working fine, I can write text, draw lines, etc.
I am having problems displaying bitmaps. I am wanting to define a bitmap in the "dat" section of a .spin file, similarly to the "ParallaxIncLOGO" and the "ChipGracey" found in the "oLED-128-G2_DEMO_v2.1b" library. I cannot figure out the format, and how to convert a .bmp file to the hex array. I started small, and was attempting just a 4x4 bitmap file, but I can't seem to get it right... the 4x4 area on the screen is all jumbled and looks like I don't have my format right. I attached a sample image that I'm trying to get to display on the screen "blocks.bmp". I tried using some converter programs, and I get this as the output of the bitmap file:
So I manually converted it to SPIN like so:
I then use this code to write to the display:
However, this just looks like a bunch of random pixels on the display.
Any help is greatly appreciated, thanks!
I have the uOLED 128 G2 from the parallax website, here is the link:
http://www.parallax.com/product/28081
I currently have it connected to a propeller microcontroller, and I am using the "oLED-128-G2_v2.1" library to communicate with it. So far everything is working fine, I can write text, draw lines, etc.
I am having problems displaying bitmaps. I am wanting to define a bitmap in the "dat" section of a .spin file, similarly to the "ParallaxIncLOGO" and the "ChipGracey" found in the "oLED-128-G2_DEMO_v2.1b" library. I cannot figure out the format, and how to convert a .bmp file to the hex array. I started small, and was attempting just a 4x4 bitmap file, but I can't seem to get it right... the 4x4 area on the screen is all jumbled and looks like I don't have my format right. I attached a sample image that I'm trying to get to display on the screen "blocks.bmp". I tried using some converter programs, and I get this as the output of the bitmap file:
{0xff0000, 0xffffff, 0xffffff, 0xffffff, 0x00ff00, 0xffffff, 0xffffff, 0xff0000, 0x0000ff, 0xffffff, 0xffffff, 0x00ff00, 0xffffff, 0xffffff, 0xffffff, 0x0000ff};
So I manually converted it to SPIN like so:
dat TestChar '------------------------ 256 color BMP Image Data below --------------------------- byte $ff, $00, $00 byte $ff, $ff, $ff byte $ff, $ff, $ff byte $ff, $ff, $ff byte $00, $ff, $00 byte $ff, $ff, $ff byte $ff, $ff, $ff byte $ff, $00, $00 byte $00, $00, $ff byte $ff, $ff, $ff byte $ff, $ff, $ff byte $00, $ff, $00 byte $ff, $ff, $ff byte $ff, $ff, $ff byte $ff, $ff, $ff byte $00, $00, $ff
I then use this code to write to the display:
LED.image(0,0,4,4,0,@TestChar)
However, this just looks like a bunch of random pixels on the display.
Any help is greatly appreciated, thanks!