RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Using getDateTime()
Author Message
Reply with quote
Post Using getDateTime() 
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.

View user's profile Send private message
Reply with quote
Post  
Thanks, we'll take a look at that!


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
Thanks, documentation fixed!

https://wiki.autosportlabs.com/RaceCapturePro_Lua_Scripting#getDateTime.28.29

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


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post Shift light auto intensity and BMW E30 
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.

View user's profile Send private message
Reply with quote
Post  
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,


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum