To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1785
1784  |  1786
Subject: 
Re: Swan firmware crash!
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Wed, 20 Jul 2005 11:13:32 GMT
Viewed: 
6669 times
  
That's where your completely wrong. I can see the error, calls to motor power
should be set out like this

    motorPower128(1) = MyVariableName;

in this example the constant "1" means set the power to output B to the value
specified by MyVariableName. Output A would be 0 and C would be 2.

You may also need to add a line like

#include "C:\WINDOWS\Desktop\Lego\SWAN\swan.nqh"

but you'd have to rewrite it to point to your copy of swan.nqh.

Hope that helps.

Steve


Here is Bricxcc help about those commands:


SetMotorPower128(const int motor, const int &v)   Function - Swan

Set the power of a motor to the specified value (using a scale from 0 to 127).

SetMotorPower128(MTR_A, 100);

_____________________________________________________________________
MotorPower128(const int n) Value - Swan

Read the power setting of a motor (using a scale from 0 to 127).

x = MotorPower128(MTR_A);


I want to SET power, not to READ it.

I think problem is that I haven't included swan.nqh
because it wasn't in the swan_test.zip!I don't know where to find it.

Can you post me a link to download it?

Thanks very much!



Message is in Reply To:
  Re: Swan firmware crash!
 
(...) That's where your completely wrong. I can see the error, calls to motor power should be set out like this motorPower128(1) = MyVariableName; in this example the constant "1" means set the power to output B to the value specified by (...) (19 years ago, 20-Jul-05, to lugnet.robotics.rcx.nqc)

23 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