I'm trying to make a program to display the motor RPMs. This is what I have:

Code:

task main(){ while(true) { time1[T1] = 0;

nMotorEncoder[motorA] = 0;

while(nMotorEncoder[motorA] < 360);

nxtDisplayCenteredBigTextLine(2, "%d", 60000 / time1[T1]); }}

It seems to work, but I think the values are high. ex: Using the MindSensors GlideWheel with a PF-XL motor, it reads an average of 200 RPMs, while Philo states that it is nowhere near 200 RPMs when powered by 9V (I'm using the PF battery box). Am I doing this incorrectly?

_________________A.K.A. inxt-generationSelf-proclaimed genius, and future world dominator.My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth DoctorBow down to Nikola Tesla, King of the Geek Gods.

Tue Jun 26, 2012 5:33 pm

MHTS

Guru

Joined: Sun Nov 15, 2009 5:46 amPosts: 1523

Re: Program to display RPMs

I don't know anything about PF-XL motors but 200 RPM isn't really that high. It is only about a little over 3 revolutions a second.

I don't know anything about PF-XL motors but 200 RPM isn't really that high. It is only about a little over 3 revolutions a second.

Looking more closely, I now see that I was at the wrong part of the page. I mistook the load characteristics for the free-spinning data. So, my program is fine. It is displaying the RPMs correctly.

_________________A.K.A. inxt-generationSelf-proclaimed genius, and future world dominator.My Brickshelf Folder"Don't they teach recreational mathematics anymore?" - The Tenth DoctorBow down to Nikola Tesla, King of the Geek Gods.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum