To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 2759
2758  |  2760
Subject: 
Re: swan question
Newsgroups: 
lugnet.robotics.rcx
Date: 
Sun, 30 Oct 2005 14:53:13 GMT
Viewed: 
5960 times
  
In lugnet.robotics.rcx, David Liddell wrote:
Hi
I'm experimenting with the Swan firmware but I have a puzzle. Is the constant
OUT_A a direct equivalent to MTR_A as replacing OUT_A with MTR_A doesnt seem to
work.I've used SetMotorPower128(MTR_A,50) to set motor speed. The command that
doesn't seem to work is OnFwd(MTR_A) or OnRev(MTR_A).

David Liddell

The help file should explain when you can use the MTR_A constant versus when you
can use the OUT_A constant.  It will tell you that MTR can be used with the
MotorPowerXXX and SetMotorPowerXXX functions.  Use the help system Find feature
and it will list the following functions:

MotorBrakePower, MotorPower128, MotorPower8, MotorPowerSigned,
SetMotorBrakePower, SetMotorPower128, SetMotorPower8, and SetMotorPowerSigned.

You can look at the NQC API via nqc -api and see that MTR_A = 0 and OUT_A = 1

  #define MTR_A 0
  #define MTR_B 1
  #define MTR_C 2
  #define MTR_D 3
  #define MTR_E 4
  #define MTR_F 5

#define OUT_A 0x01
#define OUT_B 0x02
#define OUT_C 0x04

Given that fact, technically, you could use MTR_B as a substitute for OUT_A,
MTR_C as a substitute for OUT_B, and MTR_E as a substitute for OUT_C.  I would
HIGHLY recommend that you NOT do that.

John Hansen



Message is in Reply To:
  swan question
 
Hi I'm experimenting with the Swan firmware but I have a puzzle. Is the constant OUT_A a direct equivalent to MTR_A as replacing OUT_A with MTR_A doesnt seem to work.I've used SetMotorPower128(MTR_A,50) to set motor speed. The command that doesn't (...) (19 years ago, 29-Oct-05, to lugnet.robotics.rcx)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR