First timer...building a remote controlled vehicle


Results 1 to 33 of 33

Threaded View

  1. #19
    Join Date
    Jan 2009
    Posts
    20


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by .n0rig. View Post
    That part I am good in, it is the if then and stuff that after I connect the chips to a power source....the transmitter is supposed to send the already set numbers to the receiver. When the receiver gets that info., it is supposed to use that information to control the in/out at the car so it can turn the motors on or off.

    EDIT: WORKED PERFECTLY! NOW LET ME CENTER MY THING AROUND THAT...
    This is what I did to test it with your code and it worked perfectly
    Code:
    Start:
    
    PORTc.1 = 1 'turn communication pin high
    TRAIN=$55         
    MOVEMENT	VAR	BYTE[2]  'ARRAY VARIABLE
    SERIN2 PORTC.1,396,[WAIT("9"),STR MOVEMENT\2]
    direction = MOVEMENT[0]
    turns = MOVEMENT[1]
    if turns = 1 then
    high porta.1
    if turns = 2 then
    high porta.5
    else 
    goto start
    endif
    endif
    ;goto checkdirection
    goto start
    BRILLIANT! I LOVE YOU! (just...I apreciate you )
    Now to learn how to wire those buttons up so that they work when I press them down...I really don't know anything about that. Lets say I have porta.1 connected to a button that is also connected to ground pin (which is connect to ground...). In my code, will I be looking for a "0" or "1". *just thought of this: will I have to use the poke command to get the status of the pin (either low or high)*

    Regards,

    n0rig
    Last edited by .n0rig.; - 5th February 2009 at 00:13.

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 17:39
  2. Pulse Capture and byte building
    By boroko in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st July 2009, 01:59
  3. TV remote controlled RGB LEDs
    By idtat in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd February 2009, 17:15
  4. Timer interrupt frequency
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th January 2009, 23:49
  5. Need help building a simple IR learning remote with a PIC
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 20th April 2006, 22:22

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