0% found this document useful (0 votes)
42 views

Chapter 9 IOT Data Acquisition With Python and Tkinter

This document discusses data acquisition with Python and Tkinter. It involves collecting data from various sources using Python and creating a graphical user interface (GUI) for acquisition using Tkinter. Methods for opening, writing, closing, and reading files are presented, including the open(), write(), close(), and read() methods. CSV files are described as a way to store data in Python using a CSV writer to write data and a reader to read it. Storing Arduino sensory data with CSV files through Arduino interfacing with Python is also briefly outlined.

Uploaded by

mahadgaashanle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Chapter 9 IOT Data Acquisition With Python and Tkinter

This document discusses data acquisition with Python and Tkinter. It involves collecting data from various sources using Python and creating a graphical user interface (GUI) for acquisition using Tkinter. Methods for opening, writing, closing, and reading files are presented, including the open(), write(), close(), and read() methods. CSV files are described as a way to store data in Python using a CSV writer to write data and a reader to read it. Storing Arduino sensory data with CSV files through Arduino interfacing with Python is also briefly outlined.

Uploaded by

mahadgaashanle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter 9 IOT | Data Acquisition with Python and Tkinter

Data acquisition: is the systematic process of collecting data from different sources to
obtain information for analysis, monitoring, or control purposes.

Data Acquisition with Python and Tkinter typically refers to the process of collecting
data from various sources using Python programming language and creating a graphical
user interface (GUI) for the acquisition using the Tkinter library.

The open() method: This function is a most commonly used method that is available in
Python, and it is used to manipulate files.
To open a file command:
>>> f = open('test.txt', 'w')

The write() method: Once the file is open in the writing mode, the write() method is
used to start writing to the file object. The write() method takes input argument only in
the format of a string.
>>>F.write(“Hello World!\n”)

The close() method: The close() method is used to close the file, and the file object can’t
be used again. The command is:
>>>W.close()

The read() method: is reads the data of a file. To use this method, open the file with any
of the reading compatible modes like: w+, r, r+, or a+:
>>>D = open('test.txt', 'r')
>>> D.read()

Prepared By: Ayub Awil Farah


a

CSV FILE:
CSV files: are used to store the data in Python.
CSV writer: is used to write data on a CSV file and the reader to read it with simple
command.
STORING ARDUINO DATA WITH CSV FILE:
The CSV files can be used to store the sensory data from Arduino.
The objective is: to store the sensory data with CSV files and Arduino interfacing with
Python.
The ion() method: is used to initialize the interactive mode of pyplot.

Prepared By: Ayub Awil Farah

You might also like