newbie help : subsumption


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    Hi,
    now the motor control case statement selects ok when i use numbers but i would much prefer to use text, can anyone help..
    I'm not sure I understand that correctly but let's say that this work
    Code:
    motor_control:
    
    select case motor_actuator
      case 1
        portb = %00000001 
      case 2
       portb = %00000010
    end select
    return
    Then set up some constants matching those numbers, like:
    Code:
    Left CON 1
    Right CON2
    Forward CON 4
    Reverse CON 8
    
    select case motor_actuator
      case Left
        portb = %00000001 
      case Right
       portb = %00000010
    'and so on.....
    end select
    return
    Sorry if I misunderstood.
    /Henrik Olsson.
    Last edited by HenrikOlsson; - 7th April 2007 at 16:10.

  2. #2
    Join Date
    Apr 2007
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    that works !

    thanks for you help

Similar Threads

  1. Newbie making an ignition timer
    By ChrisHelvey in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 5th August 2012, 17:45
  2. Newbie 74hc595 question
    By manjero in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 22nd January 2008, 22:22
  3. Newbie: Temperature measurements
    By Budda in forum General
    Replies: 10
    Last Post: - 30th March 2007, 09:56
  4. PIC Newbie
    By azmax100 in forum Schematics
    Replies: 7
    Last Post: - 23rd February 2007, 04:52
  5. request for a newbie forum
    By nimonia in forum Forum Requests
    Replies: 1
    Last Post: - 20th May 2006, 09:01

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