To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 23087
23086  |  23088
Subject: 
Re: why doesn't this work?
Newsgroups: 
lugnet.robotics
Date: 
Tue, 30 Nov 2004 23:19:34 GMT
Viewed: 
1048 times
  
In lugnet.robotics, Steve Hassenplug wrote:
In lugnet.robotics, Steve Hassenplug wrote:

What is the value of inc when you're done?

2000

I think that means for the first 27 times through the loop, the value for SENSOR_1
changes every time.  So all the values would be 0 or 1.

Instead of storing the timeout, try creating a seperate counter that's incromented
each time through the loop, and store that in the array.  It may turn out to be a
sequence of numbers.

I think the program is working.

Steve

Your exactly right, the results are a sequence 1-20, meaning that it takes 20
sensor changes to go from full speed to stop. The rest of the array is zero's as
it should be, so the program works perfectly.

I'm amazed though that the rotation sensor can change more quickly than the
program can loop,

I think I'll have to change to the faster firmware. I haven't yet, as the bugs
I've yet to develop out are easier to spot using the standard firmware.

Thanks

If anyone has a smooth decelaration algorithm, I'd be very interested to see it.

Steve



Message has 1 Reply:
  Re: why doesn't this work?
 
(...) That doesn't totally seem right. I would think it would slow, before stoping. One last thing to try is actually storing sensor value in the array. Also, in the Checkvar function, it looks like the line: if(temp<27) temp=0; should say (...) (20 years ago, 1-Dec-04, to lugnet.robotics)

Message is in Reply To:
  Re: why doesn't this work?
 
(...) I think that means for the first 27 times through the loop, the value for SENSOR_1 changes every time. So all the values would be 0 or 1. Instead of storing the timeout, try creating a seperate counter that's incromented each time through the (...) (20 years ago, 30-Nov-04, to lugnet.robotics)

9 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