Shop OBEX P1 Docs P2 Docs Learn Events
Javelin Stamp & GUI — Parallax Forums

Javelin Stamp & GUI

deshvilledeshville Posts: 5
edited 2006-10-05 22:28 in General Discussion
I'm working on a project that requires measuring the dimensions of a room (length and width)·with the PING Ultrasonic Sensor and I have to·represent the dimensions graphically. Can I use Javelin Stamp for this; I know·Javelin Stamp is programmed using Java and Java·has Graphic User Interface (GUI), but I don't know if GUI is supported by Javelin Stamp. If it is, how do I do this.
Thank you.

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-10-04 23:37
    The Javelin uses a very small subset of Java, which doesn't include GUIs. If you need more details, you can download the Javelin manual from the Parallax site.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-10-05 04:36
    It is possible to draw graphs on a text screen but the resolution will be low.
    For example

    ········ +
    +
    ·········|·····················|
    ·········|···················· |
    ·········|···················· |
    ·········+
    +

    could represent a rectangular room.

    The javelin IDE message window has cursor set commands
    so you can do some graphics. For 3D graphs, you would draw
    the room in 3D perspective as you would on paper.
    I wrote a class that allows you to set an area of the screen
    as a window with its own coordinates. That could be used
    as the area used for your drawing.

    If the above resolution is not enough, take a look at·the Propeller
    chip that has a VGA output. The Propeller is programmed in Spin, not java.

    regards peter
  • deshvilledeshville Posts: 5
    edited 2006-10-05 21:36
    Peter, I really don't need anything of high resolution and the example you had in your reply works for me. How do I do this though, and how can I take a look at this class you wrote.
    Thanks
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-10-05 22:03
    Look here
    http://tech.groups.yahoo.com/group/JavelinCode/files/Javelin%20Stamp%20IDE/lib/stamp/peripheral/display/

    for classes Area, Display, JIDE_Display, JIDE_Display_test

    The·Area object defines a rectangular area inside a Display object,
    but is itself also a Display object.

    To print 'semi-graphics' use the characters + - | / \
    these allow you to draw horizontal, vertical, and tilted lines.
    Additional the <· > ^ v could be used as arrow heads.

    Google for ascii drawing
    look here for some examples
    http://www.geocities.com/soho/7373/favorite.htm

    regards peter
    ·
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-10-05 22:28
    Here are some nice electronic examples:
    http://www.repairfaq.org/ELE/F_ASCII_Schem.html
    regards peter
    ·
Sign In or Register to comment.