Question
I need a C program that can read a txt file and convert to csv in a rearranged format The data in the txt file
I need a C program that can read a txt file and convert to csv in a rearranged format
The data in the txt file will have this format:
time: 0 ms potentiometer: 0.00 temperature: 0.15 light: 0.00 switch0: 0 switch1: 1 switch2: 1 switch3: 1 --------------------------- time: 20 ms potentiometer: 0.00 temperature: 0.15 light: 0.00 switch0: 1 switch1: 1 switch2: 1 switch3: 1 --------------------------- time: 40 ms potentiometer: 0.00 temperature: 0.15 light: 0.00 switch0: 1 switch1: 1 switch2: 1 switch3: 1 ---------------------------
etc...
Then scan and extract the data I want and form it into columns to export as a csv file. That data will be stored in excel with this format:
Time Potentiometer Temperature Light Switch0 etc...
0 0.00 0.15 0.00 0
20 0.00 0.15 0.00 1
40 0.00 0.15 0.00 1
etc....
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started