Using getDateTime()
Posted: Mon Dec 12, 2016 6:16 pm
We are using the function getDateTime() successfully to automatically lower the intensity of the Three Stage Sequential Shift Light, which may be a problem when racing at night (too bright), but is perfect during the day.
Perhaps an example of how it is called may help others:
Year, Month, Day, Hour, Min, Second, Mil = getDateTime()
Hour = Hour + TZONE
if (Hour < 7 or Hour > 17) then
Intensity = LOW
else
Intensity = HIGH
end
We set TZONE as negative number in comparison to UTC (-5 in Miami), and use Intensity to adjust voltage when calling setAnalogOut. HIGH was set at 0 and LOW at 4.5 (lowest it actually lights up).
There is an error in the documentation as the return value Minute is missing.
Perhaps an example of how it is called may help others:
Year, Month, Day, Hour, Min, Second, Mil = getDateTime()
Hour = Hour + TZONE
if (Hour < 7 or Hour > 17) then
Intensity = LOW
else
Intensity = HIGH
end
We set TZONE as negative number in comparison to UTC (-5 in Miami), and use Intensity to adjust voltage when calling setAnalogOut. HIGH was set at 0 and LOW at 4.5 (lowest it actually lights up).
There is an error in the documentation as the return value Minute is missing.