# First Project: Write timestamp of input to CSV

**URL:** <https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071>\
**Category:** General Guidance\
**Created:** [June 12, 2026, 12:17am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071 "2026-06-12T00:17:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![weshouston](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@weshouston](https://forum.arduino.cc/u/weshouston)\
**Post date:** [June 12, 2026, 12:17am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/1 "2026-06-12T00:17:12Z")

</div>

First Project, first post. Brand new to Arduino but love what I see of its capabilities and excited to learn more. Hoping to find some friendly advice or recommendations for tutorials.

Project Description: Each time a 24v signal is received, write to CSV in 4 columns. A) Record # (Sequential label) B) Date C) Time D) Time in secs from last signal received.

Current Hardware: Arduino Uno, Power Converter to reduce 24v signal to 5v analog input.

Current Software: Arduino IDE, Python

End Goal: Import CSV to excel for statistical data.

Have done some programming but new to language of Arduino and Python.

Any advice is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [June 12, 2026, 12:34am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/2 "2026-06-12T00:34:36Z")

</div>

And what exactly is the Arduino doing in this design? Seems to me that 99% of it will be on the PC side and in Python. There's no RTC or SD card in your design so the Arduino certainly isn't doing any file writing itself.

---

<div class="post-metadata">

**Author:** ![weshouston](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@weshouston](https://forum.arduino.cc/u/weshouston)\
**Post date:** [June 12, 2026, 12:39am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/3 "2026-06-12T00:39:51Z")

</div>

To my understanding the bridge from signal to python, the board that receives signal and outputs to PC. Watched a lot of tutorials with this setup just none with this specific function.

---

<div class="post-metadata">

**Author:** ![van\_der\_decken](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/van_der_decken/32/1006976_2.png) [@van\_der\_decken](https://forum.arduino.cc/u/van_der_decken)\
**Post date:** [June 12, 2026, 12:51am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/4 "2026-06-12T00:51:53Z")

</div>

> [@weshouston](#):
>
> the bridge from signal to python

Okay. It sounds like overkill to me, but it's your project. Have fun!

---

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [June 12, 2026, 12:59am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/5 "2026-06-12T00:59:51Z")

</div>

> [@weshouston](#):
>
> the board that receives signal and outputs to PC.

With that nebulous description, and your hardware list, Arduino seems to be merely a live interface between your 24v signal and the PC - presumably judging some analogue threashold. In this event, you can send the serial signal direct to Excel, which has its own timestamp facility. You can also produce live graphs. [PLX-DAQ version 2 - now with 64 bit support! (and further new features)](https://forum.arduino.cc/index.php?topic=437398.0)

A swag of terminal programmes also have local timestamping.

If you really want to have Arduino stand alone, you will need additional hardware, typically a clock module and a memory card.

---

<div class="post-metadata">

**Author:** ![weshouston](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@weshouston](https://forum.arduino.cc/u/weshouston)\
**Post date:** [June 12, 2026, 1:31am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/6 "2026-06-12T01:31:21Z")

</div>

Thanks for the advice, I was able to connect Arduino directly to excel with the data streamer add-in, but it limited me to 500 rows, needing to log data nearly every minute over a 24 hr period, hence the csv format to remove data restrictions. Have found code for a basic CSV timestamp using RTC and SD add-ons that will do what I need for now as an Arduino standalone.

You are correct that the Arduino is merely a live interface but necessary to communicate to PC, was hoping to find a way to write directly to PC HD without having to use SD module as it is an added step. And the RTC seems unnecessary if the PC has its own clock. Will look deeper into PLX-DAQ and compare to recommended Python.

Thank you for time and your input is appreciated.

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [June 12, 2026, 2:06am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/7 "2026-06-12T02:06:55Z")

</div>

Never tried, just thinking ...

If you replace the Uno by a board with native USB (32U4 based boards as well as most newer boards support native USB) the board can act as a keyboard and you can open a file (using the run command) on the PC, write data to it and save and close the file.

Timestamp will still be tricky. If an excel file is the target, maybe you can write a excel macro which for every record adds a data and time.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [June 12, 2026, 2:11am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/8 "2026-06-12T02:11:31Z")

</div>

> [@weshouston](#):
>
> was hoping to find a way to write directly to PC HD

Very simple. Arduino performs Serial.print(), which is captured by just about any terminal program on the PC and logged directly to a file on the disk. I use PuTTY and Teraterm on Windows machines, GTKterm on linux.

If you separate the data entries with commas using Serial.print() statements, the file will be in CSV format on the disk.

Note: the Teraterm time stamp is not the same as the data transmission time, because the Arduino to PC connection buffers data before it becomes available on the PC. Get around that by printing the Arduino millis() value in every individual data record as a timestamp.

Example code for recording an analog input value with Arduino timestamp:

```arduino
Serial.print(millis());
Serial.print(",");
Serial.println(analogRead(A0));

```

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [June 12, 2026, 2:33am UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/9 "2026-06-12T02:33:20Z")

</div>

> [@anon94801460](#):
>
> Very simple.

I wonder how I could forget about that 👍

---

<div class="post-metadata">

**Author:** ![gilshultz](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gilshultz](https://forum.arduino.cc/u/gilshultz)\
**Post date:** [June 12, 2026, 4:49pm UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/10 "2026-06-12T16:49:31Z")

</div>

Since the OP wants seconds resolution I would simply use the time stamp from the PC, the small error from the delays moving data will be relative constant and will not roll over. I am not a excel user so I do not know how to do that other then possibly a visual basic script.

---

<div class="post-metadata">

**Author:** ![beablossomr](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/beablossomr/32/1130694_2.png) [@beablossomr](https://forum.arduino.cc/u/beablossomr)\
**Post date:** [June 12, 2026, 5:36pm UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/11 "2026-06-12T17:36:10Z")

</div>

That’s a great first project you’re on the right track already. I’d keep it simple by letting the Arduino just detect the signal and send data over serial, then use Python to handle writing the CSV, since the Uno doesn’t have much memory for file handling anyway. Because your input is basically on/off, treat it as a digital signal and consider using an interrupt so you don’t miss any triggers, then use `millis()` to calculate the time between signals before sending it out. On the Python side, just read the serial data and log it with the CSV module along with date and time, and maybe add a bit of debounce to avoid duplicate triggers from noise.

> **[Serial communication](https://en.wikipedia.org/wiki/Serial_communication)**
>
> In telecommunication and data transmission, serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus. This is in contrast to parallel communication, where several bits are sent as a whole, on a link with several parallel channels.
> Serial communication is used for all long-haul communication and most computer networks, where the cost of cable and difficulty of synchronization make parallel communication impractical. Serial...

> **[Comma-separated values](https://en.wikipedia.org/wiki/Comma-separated_values)**
>
> Comma-separated values (CSV) is a plain text data format for storing tabular data where the fields (values) of a record are separated by a comma and each record is a line (i.e. newline separated). CSV is commonly-used in software that generally deals with tabular data such as a database or a spreadsheet. Benefits cited for using CSV include simplicity of use and human readability. CSV is a form of delimiter-separated values. A CSV file is a file that contains CSV-formatted data.
> CSV is not limit...

---

<div class="post-metadata">

**Author:** ![weshouston](https://avatars.discourse-cdn.com/v4/letter/w/8491ac/32.png) [@weshouston](https://forum.arduino.cc/u/weshouston)\
**Post date:** [June 12, 2026, 9:51pm UTC](https://forum.arduino.cc/t/first-project-write-timestamp-of-input-to-csv/1448071/12 "2026-06-12T21:51:28Z")

</div>

Thanks for the feedback and the links. Getting close with basic first steps just doing serial.print of date and time when signal received in Arduino. Serial to python for CSV, and the rest I can do in excel for now. Once I have the basics, graduate to using millis() before bringing CSV into excel to eliminate another step. Appreciate the advice on treating as digital with interrupt, seems you understand my goals and have foresight into other issues I may come across. Thank you.
