Shop OBEX P1 Docs P2 Docs Learn Events
Boe and Ti calc — Parallax Forums

Boe and Ti calc

DescentionDescention Posts: 9
edited 2006-06-13 19:44 in Robotics
i saw a program once, but lost it, that you could take the ti-83 or 84 (i have an 84) and use the send() command on the calc and then have the bs1 chip read it, but i just recently bought the boe bot and was thinking i could use my calculator as a wired control... does anyone have any info thata could help me with this?

Comments

  • ZootZoot Posts: 2,227
    edited 2006-06-12 16:35
    Do you need wired control per se? I think using a Sony compatible TV remote control with the existing IR detectors on the Boe-bot is probably easiest. And then you can define about as many remote control commands/codes as you care to (and as memory allows).

    www.parallax.com/dl/docs/prod/sic/IRRemoteforBoebot.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • DescentionDescention Posts: 9
    edited 2006-06-12 19:07
    ya, i don't have to use a wired controller, but i thought it would be pretty cool to run the robot with programs from my TI calc. as far as i can tell, the bs2 can not randomly generate numbers, which is one thing i want to do to control movement, random picking of direction to go after finding an obsticle from it's IR distance detectors. another use would be as a display, the calc would accept a message from the microprocessor and then display things on it's screen, that way i don't have to spend tuition money on an LCD. at least, im hoping that's possible.
  • ZootZoot Posts: 2,227
    edited 2006-06-12 19:48
    Oh, yeah, that would be slick to use the screen. Good idea.

    For random numbers, the Stamp has a RANDOM command which can scramble the bits of a variable. Unfortunately it's only pseudo random, so you if want real random-ness, you need to seed it with some value that is more or less really random.

    I usually seed my random numbers with an addition or multiplication of some of the values from my main program counter, and from my bot's sensors. The former is good because if the rand. is being called at different times, this will always have some new value, and the latter is good because your sensors will probably not all have the same values all the time. Here is a pseudo-code example:

    randVal   VAR   Word
    sensor1   VAR   Byte
    sensor2   VAR   Byte
    Counter   VAR   Word
    '....etc
    
    Main:        'main program loop
    
      'do some stuff
      'do some other stuff
      'run sensor subroutines which return values in sensor1 and sensor2
      
       'now, say you need a random number to decide what direction to go in if you are trapped....
       IF ( sensor1 < $7F AND sensor2 < $7F ) THEN 
          GOSUB Get_Random
          IF ( randVal // 2 = 0 ) THEN
             'do some stuff to go one way
          ELSE
             'do some stuff to go the other way
           ENDIF
        ENDIF
    
       'yet more main program code
    
        Counter = Counter + 1
    
        GOTO Main    ' end of main loop
    
    Get_Random:
         randVal = sensor1 + sensor2 + Counter    ' seed random value -- the sum of these numbers will be pretty dang random from moment to moment
         RANDOM randVal    'scrambles the bits using pseudo random function in the Stamp
         RETURN
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
  • manxstampmanxstamp Posts: 57
    edited 2006-06-12 20:26
    There is a way of getting the Basic Stamp 2 and a TI Calculator (TI83+ is used as an illustration) through a modified communication link cable. How useful this would be for robot control is not clear. The program simply allows numbers to be transmitted between the two units.

    See http://www.smallrobot.com/bs2ti.html

    This site is that of the firm that produces a TI calculator controlled robot, so you can drive·a robot directly if you want! I have one of these robots and they are two-wheeled differential drive robots and·fun to use. There are several sample programs. idea.gif

    For remote control you could join the TI calculator to a second Stamp, RF linked to the BOE-Bot tongue.gif

    John



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    Manxstamp,
    Isle of Man, British Isles
  • DescentionDescention Posts: 9
    edited 2006-06-13 19:44
    awesome, thank you
Sign In or Register to comment.