Reading if Pin is High or Low?


Results 1 to 30 of 30

Threaded View

  1. #22
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=390&stc=1">
    Well i guess you could fix about everything by reading the actual motor position and tell him to go to the readed position.

    well to make it more clear... here's a snip of the idea
    Code:
    MAIN:
        IF (UP = 0) AND (DOWN=1) THEN
           serout FM, T9600 ,["W01 01 200", CR, LF] 'Write velocity limit value 
           serout FM,T9600,["P01 270000", CR, LF] 'Send MOVETO_ABSOLUTE command
           ENDIF
    
        IF (DOWN = 0) AND (UP = 1) THEN
           serout FM, T9600 ,["W01 01 200", CR, LF] 'Write velocity limit value 
           serout FM,T9600,["P01 0", CR, LF] 'Send MOVETO_ABSOLUTE command
           ENDIF
    
        if (DOWN = 1) AND (UP = 1) then 
           ' SERIN motor position
           ' SEROUT motor position to make him stop
           endif
        
        goto MAIN
        End
    it's an idea. Let us know!
    Attached Images Attached Images  
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. SERIN MIDI out of Synch?
    By jncortes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th June 2009, 20:08
  2. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  3. Pic16f84 and RC5 kode
    By terminator in forum Bluetooth
    Replies: 5
    Last Post: - 18th June 2007, 21:40
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. sample code for M25P32
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th January 2007, 02:37

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