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 / 1529
1528  |  1530
Subject: 
Re:
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sun, 23 Feb 1997 22:30:30 GMT
Original-From: 
Keith R. Hacke <hacke@!StopSpammers!agedwards.com>
Viewed: 
1630 times
  
In response to the last posting.. As I understand it.. the -100 to 100
control number is then "divided down" to the nearest of the 7 speeds
available.. If I have this wrong, PLEASE let me know!

Lyle Hazelwood <amigaman@erinet.com>


Looking at lib_hb.c:

void motor(int m, int speed)
{
  if (speed>100) speed=100;
  if (speed<-100) speed=-100;
  if (speed >= 0)
    _set_motor(m, 0, (speed + 3) / 14);
  else
    _set_motor(m, 1, (-speed + 3) / 14);
}


Keith



1 Message 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