To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 185
184  |  186
Subject: 
Re: Motor control
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Mon, 18 Mar 1996 18:14:44 GMT
Original-From: 
Tom G. Brusehaver/Consultant Euler Solutions <TGB@BNUihatespam003.CNCC.BNR.COM>
Reply-To: 
tgb@=antispam=bnr.com
Viewed: 
1748 times
  
While we're on the topic, I am considering changing the speed
argument, because in actuality there are only eight discrete power
levels from off to full on, so having the speed argument range from 0
to 8 might make more sense than 0 to 100.

Depends on how far you wish IC to go.  Someday there could be another
controller that allows 100 disrete levels.  On the other hand that
could be handled well by allowing the value to go to 100, and the code
written to go to 8 would be kinda slow.

Could it be handled well by using #defines (constants), or other
functions?

#define MOTOR_STOP         0
#define MOTOR_REALLY_SLOW 12
#define MOTOR_KINDA_SLOW  25
#define MOTOR_MEDIUM_SLOW 37
#define MOTOR_MEDIUM      50
#define MOTOR_MEDIUM_FAST 62
#define MOTOR_PRETTY_FAST 75
#define MOTOR_REALLY_FAST 87
#define MOTOR_FULL       100



--
tgb@bnr.com



Message has 1 Reply:
  Re: Motor control
 
(...) <snip> (...) It would make more sense to just use motor(1,speed*14) This would give you the following: Value --> Speed 0 --> 0 1 --> 14 2 --> 28 3 --> 42 4 --> 56 5 --> 70 6 --> 84 7 --> 98 I wouldn't bother rewriting the routine. Tom (29 years ago, 18-Mar-96, to lugnet.robotics.handyboard)

Message is in Reply To:
  Re: Motor control
 
(...) Yes, and speed control is built in to the Interactive C motor function. motor(0, 100) turns on motor 0 at full speed; motor(0, 50) is half speed, etc. While we're on the topic, I am considering changing the speed argument, because in actuality (...) (29 years ago, 16-Mar-96, to lugnet.robotics.handyboard)

4 Messages in This Thread:

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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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