No announcement yet.

Looking for some sample configs light sensor

  • Filter
  • Time
  • Show
Clear All
new posts

  • Looking for some sample configs light sensor

    I'm Looking for some sample config files to do some very basic functions.
    1. make a photo sensor trigger a relay when reaching a certain light level ( for automatic headlights)
    2. use various voltage inputs trigger different relay outputs ie 1.5v triggers relay 1, 2.5v trigger relay 2, 3.5 relay 3

  • #2
    Auto head lights

    Configurator shots of my auto head light functions. If you want the xml code ask, but I think it is easier to follow here. The "2" is the light sensor value and the "100" is a countdown to delay turning them off. These numbers are placeholders until I play with the hardware for real. Averaging on the input will delay them turning on for brief shadows.

    The third head_light variable is for an override off and on buttons in my Ride Runner skin.
    Attached Files


    • #3
      One analog in multiple outputs

      You'll have to produce one of these functions for each voltage value. Absolutes don't work in real life though. Better solution will be greater than 1.2V and less than 1.8V. Add anti-thens to turn things off when the values no longer meet the criteria.

      Do you need more detail?
      Attached Files