Shop OBEX P1 Docs P2 Docs Learn Events
uOLED displaying a bitmaped avatar — Parallax Forums

uOLED displaying a bitmaped avatar

quispqixquispqix Posts: 64
edited 2007-10-09 15:07 in BASIC Stamp
O.K. So my question is straight forward,...
How can I display my avatar on the uOLED 128 GMD 1 using the basic stamp.
I am thinking data as for this part of the command

pixel1..pixelN : image pixel data and N is the total number of pixels
N = height x width when colourMode = 8
N = height x width x 2 when colourMode = 16

SEROUT TxPin, Baud, [noparse][[/noparse]"I" 0, 0, 128, 128, *8 or *16, then the pixel data, 0]

Is their some way to have a program generate all this pixel data for me?
I am assuming I need my avatar in a 128 x 128 BMP bitmap image?


burger.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I can never find anything to eat at break-time!
skype me: quispqix
echolink: 184783 KC0LGV

Comments

  • DufferDuffer Posts: 374
    edited 2007-09-10 05:11
    quispqix,

    The User Bitmapped Characters are just that, characters. 8x8 pixel characters. If you have a 128x128 (or smaller) image you want to display......

    You're making it way to complicated. Download the Garphics Composer (free download from 4D Systems) at:

    http://www.4dsystems.com.au/downloads/Graphics_Composer/Ver2.XX/

    After installation, Put the uSD card in a card reader or other device that maps to a letter drive on your PC. Set the Device in Graphics Composer to point to the letter drive, select and load you avatar (BMP, JPG, etc.)·or video (AVI, MPEG, WMV,animated GIF, etc). Check the text file created by the Graphics Composer (your project name.txt), it will give you the location on the card of your image(s) (HEX and DEC). Put the uSD card back in the display and use the Display Image command to display the image on the uOLED. (Default start location for loading images is $200000).

    In your SEROUT command:·· [noparse][[/noparse]"@", "I", 0,0, 128,128, 16, $20, $00, $00]

    With a 1BG uSD card·and the uOLED-128-GMD1, you can load up to 32,768 full screen images!

    Load as many as you want. As long as you know the loacation (see above) you can display any image stored or multiple images at ~13 frames/sec (128x128).

    That's it.··· Steve






    Post Edited (Duffer) : 9/10/2007 6:20:04 AM GMT
  • quispqixquispqix Posts: 64
    edited 2007-09-12 01:57
    Thank you for answering, that program Graphics Composer, If it works I cannot find a way to convert the .bmp file to .gcs

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I can never find anything to eat at break-time!
    skype me: quispqix
    echolink: 184783 KC0LGV
  • DufferDuffer Posts: 374
    edited 2007-09-12 05:44
    quispqix,

    Now you've confused ME. I don't understand your reference to CONVERTING a .bmp to .gcs. The .gcs file that is created by the Graphics Composer is·a "project file" used by the Graphics Composer to save a list of files and actions (delay, etc.) so that you can reopen it later to load another device or to make modifications.

    Are you having trouble using the Graphics Composer software? The·User Guide, if you haven't already downloaded and read it, can be found at:

    http://www.4dsystems.com.au/downloads/Graphics_Composer/Ver2.XX/Graphics_Composer_User_Manual_Rev_2.0.0.2.pdf

    Steve
  • bkibabkiba Posts: 17
    edited 2007-10-05 22:41
    The graphics composer program does not tell you what addresses it is using. How can you tell what they are? Or do you just have to calculate them based on the size of the files?
  • bkibabkiba Posts: 17
    edited 2007-10-05 22:45
    nevermind found it =p
    but now I can't get the pic to display. Here is the code I'm using:

    SEROUT TxPin, Baud, [noparse][[/noparse]$55] ' Establish Auto-Baud Detection
    GOSUB GetACK
    PAUSE 200
    Xmax = 127
    '
    [noparse][[/noparse] Program Code ]

    Main:
    onoff =1
    SEROUT TxPin, Baud, [noparse][[/noparse]"Y", 2, 15] ' Contrast High
    SEROUT TxPin, Baud, [noparse][[/noparse]"s", 1, 13, 1, wh1, wh2, "PICTURE FUN", 0]
    SEROUT TxPin, Baud, [noparse][[/noparse]"@","I", 0,0, 127, 127,8,$20, $00, $00]


    GetACK:
    SERIN RxPin, Baud, 300, Missed, [noparse][[/noparse]Rx]
    IF (Rx = $06) THEN
    RETURN
    ELSE

    Missed:
    ENDIF
    RETURN


    The program will display the text, but it will hang @ the line after with the @I command. Here is the output from the image maker program thing:
    File "C:\Documents and Settings\Ben\My Documents\basic stamp\oLED\happyface.bmp"
    Location = 0x200000(2097152)
    Width = 128 Height = 128 Bits = 16
    Cmd (0) = 40
    Cmd (1) = 49
    Cmd (2) = 0
    Cmd (3) = 0
    Cmd (4) = 80
    Cmd (5) = 80
    Cmd (6) = 10
    Cmd (7) = 0
    Cmd (8) = 10
    Cmd (9) = 0
    Cmd (A) = 7
    Cmd (B) = 3
    Cmd (C) = E8
    Cmd (D) = 45
    Cmd (E) = B
    Cmd (F) = 0
    Cmd (10) = 0
    Cmd (11) = 0
    Cmd (12) = 0

    thanks in advance!

    Post Edited (bkiba) : 10/5/2007 11:15:38 PM GMT
  • bkibabkiba Posts: 17
    edited 2007-10-06 22:13
    can anyone help on this? does anyone have code that works for a single image?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-09 15:07
    If the posted code is what you're using then your program is going to crash and restart because your main routine falls into the subroutine which has a RETURN for which there was no GOSUB.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.