get time from PC

Hi all,

I need some help is there a way to get the time from my pc without having to enter the unix date format
manually to arduino ?

any help is appreciated thank you guys !

Anouar47:
Hi all,

I need some help is there a way to get the time from my pc without having to enter the unix date format
manually to arduino ?

any help is appreciated thank you guys !

compile time or run time?

If you mean to get the time from the PC while the program is running then you’ll need some program running on the PC to send the time to the Arduino.

Hi BulldogLowell basically I need to make a supervision plateform in labview and I need to get hour() and minute() values in order to use them in labview

Hi Delta_G

so to be precise I want to create a log in labview and for that I need to get the real time when a sensor make its measures is there a way to get around it automatically using a sketch or something ?

No, the Arduino can't tell the PC to give up anything. But it sounds like the logging is done on the PC side. IS that right? So why does Arduino need to know the time? IT should just notify the PC to log something and the PC can add the timestamp.

But if you really do need to get the time from the PC you'll have to write a program to run on the PC to send the time to the Arduino over the serial line.

If you just need time on the Arduino and don't care exactly where it comes from, then put an RTC module on the Arduino and let it keep time.

thanks Delta_G

Well I need the arduino to know the time because I guess it is easier this way whenever a measure is carried out , Arduino can send the time to labview basically every measure is sent with its time of occurrence

Anouar47:
thanks Delta_G

Well I need the arduino to know the time because I guess it is easier this way whenever a measure is carried out , Arduino can send the time to labview basically every measure is sent with its time of occurrence

Is it really easier? Because if you let the PC add the time-stamp then you're practically already done with it. If you want Arduino to add the time-stamp then you've got a bunch of coding to do.

Yeah I guess it is never easy as it looks thank you so much for your help I will give it a try cheers