Page 1 of 1

Using getDateTime()

Posted: Mon Dec 12, 2016 6:16 pm
by wcorredor
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.

Posted: Sat Dec 24, 2016 7:43 pm
by brentp
Thanks, we'll take a look at that!

Posted: Sat Dec 24, 2016 7:46 pm
by brentp
Thanks, documentation fixed!

https://wiki.autosportlabs.com/RaceCapt ... Time.28.29

That's a fantastically cool way to lower the brightness!

Shift light auto intensity and BMW E30

Posted: Sat Dec 24, 2016 10:25 pm
by wcorredor
It is possible to lower intensity even more, if you find that 4.5v is still too bright at night, by setting the analog channel frequency higher. One starts noticing more dimming above 25000 Hz.

To do that add:

setPwmClockFreq(LightFQ)

Make LightFQ = 25000 and above.

Perhaps it is possible to also use (I haven't tried that yet)

setPwmDutyCycle( channel, dutyCyclePct )

and lower the dutyCycle % to dim, so that you can control each light intensity individually.

I set up a BMW E30 with RPM, oil pressure, coolant temp, shift lights, gear position, break pedal, throttle pedal and gas level as well as a neat way to use the shift lights also as alarms. I removed the dashboard completely and replaced it with a Galaxy 10. It works great. I will post detailed instructions on sensors and lua code in January after endurance testing at a Chumcar race at Sebring.

Posted: Sat Dec 24, 2016 10:26 pm
by brentp
I love it. We would love to feature it in a blog post, even what you have now! Share any pictures you have when convenient.

Thanks,