View unanswered posts | View active topics It is currently Fri Feb 22, 2019 9:01 pm






Reply to topic  [ 1 post ] 
Datalogging and addToDatalog 
Author Message
Rookie
User avatar

Joined: Wed Jan 09, 2013 11:48 pm
Posts: 46
Location: Saint Paul, MN
Post Datalogging and addToDatalog
I want to see how our old batteries and motors still perform compared to the new ones, and I thought the datalogging feature of the NXT could be promising. So I ran the sample code for datalogging and the data made absolutely no sense. It seemed like I was trying to add the numbers 1-10, but it just gave me values like this:
Code:
  0,     64
  0,     64
  0,     64
  0,     64
  0,  49891
 45,     33
 64,      0
 66,      0
 65,      0
 64,      0
227,  11715
 33,  16640
  1,  16384
  1,  58112


Here's the important part of the sample code:
Code:
//
   // A simple loop to fill the datalog. It runs so fast that you probably can't see the
   // numbers changed in the call to 'nxtDisplayTextLine'
   //
   time1[myTimer] = 0;
   for (i = 0; i < kDatalogSize; ++i)
   {
      if ((i % 10) == 0)
      {
         AddToDatalog(0, time1[myTimer]);
        AddToDatalog(kDataPointType2, i);
      }
      AddToDatalog(kDataPointType1, i);
      AddToDatalog(0, i);
      nxtDisplayTextLine(3, "Write %d", i);
      wait1Msec(1);
   }


Can someone explain what's happening or what I'm doing wrong? Thanks!

_________________
Head Programmer FTC Team 6699, Tempest

Code:
<Life>
   Fun
</Life>


Fri Aug 29, 2014 10:11 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.