How to recognize the "Enter" keystroke


Results 1 to 8 of 8

Threaded View

  1. #4


    Did you find this post helpful? Yes | No

    Default Re: How to recognize the "Enter" keystroke

    Henrick,
    I got your idea to work using a modification to your code. I need do do more testing, but it seems solid. The modified code is as follows:

    Code:
        i       VAR BYTE
        Value   VAR WORD
        Array   VAR BYTE[5]
       
        Main:
           gosub ClearArray 
           
           HSEROUT ["  Enter New Motor Runtime x 10",13,10]'enter new Value if needed
           
          HSERIN [STR array\7\13]     
           IF array[0] = 10 or array[0] = 13 OR array[0] = 0 THEN 
           arraywrite array,[dec Value] 'this is the old value
           endif
           
           ArrayRead array,[DEC Value] 'this is the new value
           Goto report 
    
            ClearArray:
                For i = 0 to 4
                    array[i] = 0
                NEXT
           RETURN
           
    report:       
           write 0,Value.byte1     'write new value to eeprom
           write 1,Value.byte0
           HSEROUT [ "   ",dec Value/10,46,DEC Value dig 0," Seconds",13,10,10]
    Last edited by Dick Ivers; - 2nd December 2014 at 01:22.

Similar Threads

  1. Replies: 0
    Last Post: - 14th November 2013, 03:32
  2. Replies: 3
    Last Post: - 15th October 2012, 08:06
  3. Replies: 8
    Last Post: - 3rd March 2011, 22:20
  4. Replies: 1
    Last Post: - 27th August 2009, 02:42
  5. Replies: 1
    Last Post: - 16th February 2005, 20:05

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts