line follower (please help me)

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: line follower (please help me)

Post by mattallen37 »

pepijndevos wrote:...CurrentTick is a timer that is incremented 100 times a second, so it can be used for waiting and timing actions.
Uh, sort of.

CurrentTick() returns the number of ms the NXT has been on. It's is incremented 1000 times per second (so it's a ms count). You can use it for precise time measurement. The NXT FW uses a 32 byte unsigned variable to store the current tick, so it won't overflow until the NXT has been on for over 49 days (49.71026961805556 days).

A really cool thing about the current tick, is that it's universal to the NXT (not just global to the program). That means you can run programs, go through the menus... and it keeps incrementing without resetting.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: line follower (please help me)

Post by pepijndevos »

100 times, what was I thinking… I hope I just missed a zero. Thanks for correcting me, and interesting to know it is global to the NXT.
-- Pepijn
http://studl.es Mindstorms Building Instructions
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 10 guests