Shop OBEX P1 Docs P2 Docs Learn Events
Help with the keyboard and tv_text objects — Parallax Forums

Help with the keyboard and tv_text objects

LoridanLoridan Posts: 12
edited 2007-07-05 20:21 in Propeller 1
All,

Let me start by saying that I am new to working with parallax products and I appreciate any help that you can offer. I have been trying to understand how to interface the television and keyboard. From what I can see the keyboard object can use getkey to get the (ASCII or keycode?) value of the key pressed. The lack of examples for this is depressing...
When I look at the file TV_Text.spin at the out() method it is declaring two local variables i and k? why? it doesn't even use them. In the same method we see $0D = return, but the ascii code for the enter key is $EB0D.
Can someone please explain to me what kind of character this out method is expecting, because it doesn't look like ascii. Again any help here is greatly appreciated. I'm just trying to echo the characters pressed on the keyboard to the television screen. I hope parallax or someone writes another book. I have the manual and I can't find this information anywhere.

Comments

  • LoridanLoridan Posts: 12
    edited 2007-07-04 14:35
    All,

    I see now that the out() method is taking unicode that maps to the character rom in the chip, so you can echo characters simply with term.out(kb.getkey).
    My other questions still stand though... For example, why do so many of these methods have local variables declared after the | symbol that they are not using?

    I guess my next project will be coding a gets method into the keyboard object and writing a word wrapping routine.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-07-05 20:21
    Those were left over from the development, Chip wrote the driver along with VGA_Text in a couple evenings. You can remove the unused local variables.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.