No announcement yet.

Use temperature sensor to trigger RR command

  • Filter
  • Time
  • Show
Clear All
new posts

  • Use temperature sensor to trigger RR command

    I have the four-input temperature sensor connected my comm port. Since I only use two of the sensors, I came up with the idea of using one of the others to monitor the IGN wire of my car so that I can do things in software when the ignition goes on or off.

    A simple way of rigging this would be to put a relay on a temperature sensor so that it is only connected when the IGN is on, so RR will only receive data from this sensor when the IGN is on.

    But I have no idea how to monitor this sensor with RR. I do not understand how this "tmr" or "timer" function works. "tempX" is going to be either a number or null, I guess. I'd need to execute a command both when this changes from a number to null and vice versa.

    (My goal with this is to trigger a preexisting phidgets relay to keep the RMS wire of my power supply high, so that it doesn't turn off when I turn off the ignition. Instead it will turn off the screen, pause the music, and wait a half hour before hibernating. If the RMS goes high again before that time, it will turn on the screen and resume the music. Right now I run a command to turn on the relay manually when I have run in a store or whatever.)

  • #2
    When RR reads a temperature sensor, it keeps that number as the current temperature until it gets a new reading from it. So, if you plug the temperature sensor, it will change from "N/A" to the current number, when you unplug it, it will stay at that value until a new temperature value comes in OR until you restart RR or unplug the whole temperature sensor board altogether for at least 10 seconds (so RR resets the COM port connection).

    All I'm saying is that unless you read the temperature sensor yourself (plugin/script/application), you won't have the ability to make such detailed control when a temperature stops being transmitted. The built-in code in RR is optimized to display temperatures and nothing else. Either you figure out a way to show specific values for the temperatures and then compare those values in the skin to determine the state of something outside OR you write your own code (plugin/app) to check for those situations of the sensor presence -- and then you can just send to RR the 2 temperatures you want to display in it.

    If you have a free serial port, I'd suggest you look into this thread:

    You can definitely do things based on the indicator states provided by the 3 inputs (standard) on any serial port.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."


    • #3
      Thanks, guino. I'm going to write a separate application to handle this and send the temperatures to RR. If it works well I'll post it.


      • #4
        If you know enough to write an application, the Aduino used in this thread is an interesting beast:

        It costs about the same as the temperature module in this country. I had a look at the tutorials and programming guide and there is enough about sensors in this to allow you to build a USB based device that could do the temperatures and all sorts of other things such as control relays, read voltages, turn switches and is really simple to program (but a basic understanding of C would help). I have considered using one to do the phone thing as discussed in the thread above. You could configure it to send messages back to the PC via the USB com port and have a number of messages that is parsed by the application you write that then interfaces with RR. I thought messages might look something like:

        One interesting feature is to be able to feed it a reference voltage (say the regulated 19 volts my laptop runs on and then measure a voltage (say my starting battery or my Aux battery) in 255 steps from 0-19 volts (eg in increments of 0.07 volts). This is a good range for vehicle applications.

        You could also use it to trigger a device on an event occurring without involving the PC at all or set it up as stand alone without the PC to control whatever you wanted. eg. When Door opens, turn PC on.
        To my mind, it seems much more flexible than the fusion brain if you have basic electronic knolwedge and can do a bit of programming (both on the PC and on the Arduino)

        2007 Toyota Hilux with a CarPC..

        OziExplorer GPS Embedded in RR:


        • #5
          rodweb, the goal here is to do this with minimal pain and zero further outlay of cash. It actually only took a few minutes to get this working in a separate VB application.


          • #6
            Guino, or anybody, where can I find a VB6 example of how to send data to RR? The only link I've found to the source containing the SDK is dead. I found this but there's nothing about how to send data using the COM object method and there's no example of how to use the sendMessage method.


            • #7
              Never mind, I found it.


              • #8
                No worries, I have not bought the temp sensor yet and am keen to do the phone thing, so might go the arduino route after I get a few more things sorted out with my install. I may add a temp sensor as well (as I have a dual battery and a fridge for the beer in my rig) but I thik the Arduino can do it all.

                I did find a good thread once where the COM model was demonstrated and described in detail. It was not about programming but a specific topic which I am sorry I totally forgot.
                2007 Toyota Hilux with a CarPC..

                OziExplorer GPS Embedded in RR: