|
@@ -1,20 +1,4 @@
|
|
-ChatGPT 3.5
|
|
|
|
-User
|
|
|
|
-i want an serial read sotware that has an tkinter button with start stop and save, i want to start measuring with start and continue measuring till stop is pressed or 10000 sample points are reached, sample with an rate of 200hz when i click save i want an dialog field and save the data as csv, the header shall look like timestamp,value,
|
|
|
|
-while measuring give every datapoint an timestamp using time.time()
|
|
|
|
-ChatGPT
|
|
|
|
|
|
|
|
-Sure, I can guide you through creating a Python script that fulfills your requirements using Tkinter for the GUI and a serial library for communication. Here's a basic outline of the steps we'll take:
|
|
|
|
-
|
|
|
|
- Create a Tkinter GUI with buttons for start, stop, and save.
|
|
|
|
- Use the serial library to communicate with your device.
|
|
|
|
- Start reading data when the start button is clicked.
|
|
|
|
- Stop reading data when the stop button is clicked or when 10,000 sample points are reached.
|
|
|
|
- Save the data to a CSV file when the save button is clicked.
|
|
|
|
-
|
|
|
|
-Let's start by creating the script:
|
|
|
|
-
|
|
|
|
-python
|
|
|
|
|
|
|
|
import tkinter as tk
|
|
import tkinter as tk
|
|
from tkinter import filedialog
|
|
from tkinter import filedialog
|