Staritng timer software for rc cars

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fester
    Senior Member
    • May 2017
    • 158
    • Slovakia

    #1

    Staritng timer software for rc cars

    Hi guys,i made some hardware for lap timer for rc rally cars.Software for this timer can register switching two pins on serial port so i made simple photocell gate with rellay,everything is working well..but i have problem with starting timer on another computer. Cars starting every minute,i need this beeping :

    30s to start -1short beep,
    10s to start -2short beeps,
    3,2,1s - short beeping
    0(start) - 1 long

    and repeat this every minute.Time must be taken from system time because i have another program,simple full screen clock where is running time for racers.
    Problem is that i cannot find some software which can do this. I tested maybe 10 alarm clock softs,tried to find some info arround but nothing...
    Maybe someone from you know some software which work like i need,i appriciate every help..
  • eccerr0r
    Solder Sloth
    • Nov 2012
    • 8699
    • USA

    #2
    Re: Staritng timer software for rc cars

    What are you trying to do this on, will it be running on a PC or you want hardware/microcontroller/etc. to do this... do you have lights to also alert the driver to start that the beeper needs to be synchronized with?

    Comment

    • fester
      Senior Member
      • May 2017
      • 158
      • Slovakia

      #3
      Re: Staritng timer software for rc cars

      Lap timer is running on one computer with windows,this computer register cars at the end of the track. I need solution for starting timer,my idea was runnig it on computer or tablet,i have time and display there-with some software is this the simplest solution.Another solition is making something with arduino but there i need to make some kind of display,some board,RTC .. what is more expensive and time consumpting.Actually i dont need to synchronize times on this two devices,i dont need the exact time of lap,i need only diferences between two cars.I had also another idea,sending time over serial port to ardiuno and simple sketch which compare the received time and beeps on some pin,amplifier and 2 small speakers. I made also some batch script which send this time to serial but i cannot read it on arduino for some reason,dont know why,learning python or c++ to coding something on computer is not the simplest thing now :-D

      Comment

      • eccerr0r
        Solder Sloth
        • Nov 2012
        • 8699
        • USA

        #4
        Re: Staritng timer software for rc cars

        This seems to be fairly straightforward software, but maybe a little more complex if you want it interrupt driven for timing accuracy.

        I was also a bit concerned over accuracy is false starts, if someone jumps the gun. Else all you need to do for an inaccurate program to do this is very simple:

        def oneshortbeep():
        start_beep(low_frequency)
        sleep (100ms)
        stop_beep()
        sleep (900ms)

        def twoshortbeep():
        start_beep(low_frequency)
        sleep (100ms)
        stop_beep()
        sleep (100ms)
        start_beep(low frequency)
        sleep (100ms)
        stop_beep()
        sleep (700ms)

        def longbeep():
        start_beep(high_frequency)
        sleep (1000ms)
        stop_beep()

        while True:
        sleep(29s)
        oneshortbeep()
        sleep(19s)
        twoshortbeep()
        sleep(6s)
        oneshortbeep()
        oneshortbeep()
        oneshortbeep()
        longbeep()


        This is NOT timing accurate but should be very close to 1 minute. You'd have to tweak the instruction timings to get exactly 1 minute or use a timer with a well-defined clock.

        Comment

        • fester
          Senior Member
          • May 2017
          • 158
          • Slovakia

          #5
          Re: Staritng timer software for rc cars

          Thanks for this but i have no experience with this language,i downloaded python,copyied it to IDLE a tried to run but i get error in start_beep .. need i also some "header" or some kind of library (like in C) to run this?

          Comment

          • eccerr0r
            Solder Sloth
            • Nov 2012
            • 8699
            • USA

            #6
            Re: Staritng timer software for rc cars

            It's meant to be pseudocode - human readable and not any specific language.

            Now exact language details require what language you're targeting...

            Comment

            • fester
              Senior Member
              • May 2017
              • 158
              • Slovakia

              #7
              Re: Staritng timer software for rc cars

              ok,i understand this program,also can write something like this for arduino or some atmel avr in C or assembler, but i cannot write line of code for computer except some bash script

              Comment

              • eccerr0r
                Solder Sloth
                • Nov 2012
                • 8699
                • USA

                #8
                Re: Staritng timer software for rc cars

                Well you could write it in bash on a Linux PC's pc-speaker:

                #!/bin/bash
                while true; do
                sleep 29
                beep -f 400 -l 100 -D 900
                sleep 19
                beep -f 400 -l 100 -d 100 -n -f 400 -l 100 -D 700
                sleep 6
                beep -f 400 -l 100 -D 900
                beep -f 400 -l 100 -D 900
                beep -f 400 -l 100 -D 900
                beep -f 1000 -l 500 -D 500
                done


                once again this is not time accurate, it takes over one minute to get through this loop so it won't match up with the clock.

                Comment

                • fester
                  Senior Member
                  • May 2017
                  • 158
                  • Slovakia

                  #9
                  Re: Staritng timer software for rc cars

                  because this computer is running windows.. i know,i can run bash script also in win but this is not the best solution,i think here can be the inacuraccy even more significant..maybe something more complex with comparing with actual system time.but i really think that exist some timer program which can do what i need and is also user friendy with graphic interface etc.(this lap timer is not for me) Or the solution with hardware beeper. I can send actual time to serial on arduino with command batch script,i see also some activity on this port but on arduino i get nothing.null.both sides are configured to 9600 8n1. if i send it to stdout-i get system time in 1/100 resolution without problems. I found also some example programs in python to communicate with arduino over serial,maybe this is the right way.

                  Comment

                  Related Topics

                  Collapse

                  • KYBOSH
                    Leviton SmartlockPro Programmable Electronic Timer Switch With Astronomical Clock Wont Keep Time After Power Outage
                    by KYBOSH

                    Model number VPT24-16Z.
                    https://leviton.com/products/vpt24-16z

                    I have 3 of these in my home for over 10 years now and Im planning on replacing them as I lean towards a Philips Hue home setup.
                    They are great units but they lost the ability to keep/store the time and settings after power outages and brown outs.
                    I knew it was a battery in there somewhere but never got around to looking into it.
                    Well an opportunity came for me to remove this from its home in my wall so I disassembled it to see what was going on.
                    I found a 3.6V LIR1632 battery spot...
                    07-31-2024, 09:37 PM
                  • Document Archive
                    DELL XPS 9560 Notebook 15 Specification for Upgrade or Repair
                    by Document Archive
                    This specification for the DELL XPS 9560 Notebook can be useful for upgrading or repairing a laptop that is not working. As a community we are working through our specifications to add valuable data like the 9560 boardview and 9560 schematic. Our users have donated over 1 million documents which are being added to the site. This page will be updated soon with additional information. Alternatively you can request additional help from our users directly on the relevant badcaps forum. Please note that we offer no warranties that any specification, datasheet, or download for DELL XPS 9560 Notebook...
                    09-06-2024, 05:46 AM
                  • Document Archive
                    DELL XPS 9560 Notebook 15 Specification for Upgrade or Repair
                    by Document Archive
                    This specification for the DELL XPS 9560 Notebook can be useful for upgrading or repairing a laptop that is not working. As a community we are working through our specifications to add valuable data like the 9560 boardview and 9560 schematic. Our users have donated over 1 million documents which are being added to the site. This page will be updated soon with additional information. Alternatively you can request additional help from our users directly on the relevant badcaps forum. Please note that we offer no warranties that any specification, datasheet, or download for DELL XPS 9560 Notebook...
                    09-06-2024, 05:40 AM
                  • Document Archive
                    DELL XPS 9560 Notebook 15 Specification for Upgrade or Repair
                    by Document Archive
                    This specification for the DELL XPS 9560 Notebook can be useful for upgrading or repairing a laptop that is not working. As a community we are working through our specifications to add valuable data like the 9560 boardview and 9560 schematic. Our users have donated over 1 million documents which are being added to the site. This page will be updated soon with additional information. Alternatively you can request additional help from our users directly on the relevant badcaps forum. Please note that we offer no warranties that any specification, datasheet, or download for DELL XPS 9560 Notebook...
                    09-06-2024, 05:40 AM
                  • titomno2
                    Gaming Laptop Zephyrus S17 TFT not detected every time !
                    by titomno2
                    Hi guys,
                    I post my problem here because I think it could be a capacitor related issue (Asus support on this particular subject is non-existing).
                    So the computer is a Zephyrus-S17-GX735LXS-26T and the strange behavior is seen.
                    On cold start most of the time the internal screen is detected and a picture it works fine until shutdown, sleep or deep sleep.
                    Then the screen won't work for a long period of time.
                    If I wait 1 or 2 hours it work again most of the time.
                    When it doesn't work the batterie indicator blink 3 times white stop and the same schematic is repeated...
                    01-19-2025, 08:27 AM
                  • Loading...
                  • No more items.
                  Working...