Distribution for diskette?

Tony Hammitt thammitt at kc.rr.com
Thu Jan 13 11:50:12 CST 2000


Bradley Miller wrote:
> 
> Hmm -- I have an interesting puzzle here.  I'm wondering how to make a
> distribution that could allow a PC to boot up (preferably a laptop) and
> then allow a person to capture values to a diskette that would be readable
> on a Dos/Windows environment.   The reason -- I can use C (I'm thinking
> this outloud, correct me if I'm wrong) to build a program to run on that
> diskette and then I'll have a very slick/quick way of doing this.
> 
> The reason?  I'm working on a datalogger for my car, it'll sample from the
> Map sensor, O2, RPM, etc... and I want it to store that data so I can
> retrieve it on my regular computer to see what happens when.  (O2 sensor
> goes to what reading under WOT in 3rd gear for example.)  I already have a
> VOM (volt/ohm/meter) on my O2 . . . but this device I'm working on would do
> things alot better.   Anyone have any suggestions/hints for a Linux powered
> laptop compatible way of doing this?
> 
> Requirements:
>   - Capture xx (whatever fits on disk) minutes(?) worth of readings
>   - Read data from serial port at 2400 baud to give feedback on system
>   - Have some sort of timer info, to correlate the RPM, MAP, O2, clutch,
> etc....
>   - Fit on a diskette (1.4Mb)
>   - Linux based / written in C
> 
> Any help would be greatly appreciated!   Thanks in advance!
> 
> -- Bradley Miller

I think that the hard part would be setting up the hardware side of the
device, not the software side.  It sounds to me like you need a lot of 
electronics to do this.  Reading data from the serial port is (I hear)
pretty easy.  Getting all of the data gathered, A->D'd, serialized,
timestamped and transmitted seems like the hard parts.  You must be some
kind of hardware guru...

You can use setserial(8) to set up the 2400 baud port etc.  Then I think
you just do something like fd=open("/dev/ttyS1", O_NOCTTY|O_SYNC, 0600);
and start reading values in from the port.  Anyone disagree?  I'm guessing...

Look on freshmeat.net for other serial polling programs, I bet someone
posted something useful.

Regards,

Tony




More information about the Kclug mailing list