Shop OBEX P1 Docs P2 Docs Learn Events
Prop Quickstart with Human Interface Board — Parallax Forums

Prop Quickstart with Human Interface Board

FRC2370FRC2370 Posts: 128
edited 2013-01-19 21:23 in Propeller 1
I have the BST software (using a Mac) and am totally new to Propeller programming, but when i load this code:
CON _clkmode = xtal1 + pll16x
_xinfreq = 5_000_000


SERIAL_BAUD = 115_200
CODES_PER_LINE = 32
DATA_PIN = 26 ' Should be pulled high to 3.3V with 10K resistor.
'As used on Demo Board
CLOCK_PIN = 27 ' Should be pulled high to 3.3V with 10K resistor.
'As used on Demo Board


OBJ
Term : "Parallax Serial Terminal"
Kb : "pedals"


PUB Start
'start the tv terminal
Term.Start(SERIAL_BAUD)
Term.Str(string("Pedals...", Term#NL))
'start the keyboard
Kb.Start(DATA_PIN, CLOCK_PIN)
'echo keystrokes in hex
repeat
repeat CODES_PER_LINE
Term.Char("$") ' hex indicator in Spin
Term.hex(Kb.Getkey, 4)
Term.Char(" ")
Term.Char(Term#NL)

and it says theres an error Term "Parallax Serial Terminal". whats this mean?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-01-18 18:55
    The error probably means that it can't find the file "Parallax Serial Terminal.spin" which is referenced in the OBJ declaration for Term.

    The object files have to be either in the same directory as your source file(s) or in the library directory which is set in one of the preferences windows.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-01-18 18:59
    It looks like you are trying to post code. Use
    [/B] and [B][/code ] [/B]blocks [I](without the spaces to get your entry to look like this...)[/I]
    
    [code]
    CON _clkmode = xtal1 + pll16x
    _xinfreq = 5_000_000
    
    
    SERIAL_BAUD = 115_200
    CODES_PER_LINE = 32
    DATA_PIN = 26 ' Should be pulled high to 3.3V with 10K resistor.
    'As used on Demo Board
    CLOCK_PIN = 27 ' Should be pulled high to 3.3V with 10K resistor.
    'As used on Demo Board
    
    
    OBJ
     Term : "Parallax Serial Terminal"
       Kb : "pedals"
    
    
    PUB Start
    
     'start the tv terminal
     Term.Start(SERIAL_BAUD)
     Term.Str(string("Pedals...", Term#NL))
     
     'start the keyboard
     Kb.Start(DATA_PIN, CLOCK_PIN)
    
     'echo keystrokes in hex
     repeat
       repeat CODES_PER_LINE
          Term.Char("$") ' hex indicator in Spin
          Term.hex(Kb.Getkey, 4)
          Term.Char(" ")
          Term.Char(Term#NL)
    

    BST doesn't come with Parallax Serial Terminal.spin. Here's a copy.

    Parallax Serial Terminal.spin
  • varnonvarnon Posts: 184
    edited 2013-01-19 15:19
    The standard library comes with the installation of PropTool for the PC. BST does not come with any library, you will have to get everything manually from the obex.
    I wish this was not the case. I installed PropTool on a school PC, and took the library home for my Mac.

    As far as I know, the basic library isn't hosted anywhere.
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-19 21:23
    OK thanks guys. Also, since im trying to translate PS/2 protocol to USB how well will this work for analog potentiometers?
Sign In or Register to comment.