To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1537
1536  |  1538
Subject: 
Re: write files2
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Thu, 2 Oct 2003 14:08:52 GMT
Viewed: 
4983 times
  
In lugnet.robotics.rcx.nqc, Markus Wegmann wrote:
thx for your answers.

let me specify the problem better:

the rcx is always connected with the PC.

By "connected" do you mean always within range of the infrared tower?

now i have a lightsensor and i want to
save the results of the lightsensor every 2 seconds
to my log.txt file ;)

How long do you need to do this?  Do you need to access the text file while the
robot is running, or do you only plan to use the data after the experiment is
over?

What is the best and easyiest way to do that?

The best way to do this depends entirely on what you are trying to do.  The
easiest way to do this is probably to save the data into the datalog every two
seconds and then use an existing piece of software to upload the datalog to the
PC when you are done.

But if you need to collect the data points every two seconds and immediately
write them to a file until the power goes out, you'll probably have to write
your own program to run on the PC.  Your program could monitor the contents of
one or more variables in your RCX program in order to retrieve the light sensor
reading, and also to know when a new light sensor reading is available.  But
keep in mind that all those infrared messages bouncing around can affect your
light measurements.  You probably want to have the RCX send a one-byte message
to the PC to indicate when a new light reading is available, then have your PC
program read the contents of a single RCX variable to retrieve the data point.

It would be easier for people on this list to help you if you would provide more
details about what you are trying to do, as well as anything you might already
have tried.  What language are you using to program your RCX?  What programming
languages do you know for the PC?  What are you trying to measure with these
light sensor readings?  There are plenty of people on this list who can give you
good advice, but you've got to take the time to describe the problem first.

- Chris.



Message is in Reply To:
  write files2
 
thx for your answers. let me specify the problem better: the rcx is always connected with the PC. now i have a lightsensor and i want to save the results of the lightsensor every 2 seconds to my log.txt file ;) What is the best and easyiest way to (...) (21 years ago, 1-Oct-03, to lugnet.robotics.rcx.nqc)

5 Messages 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