Will GP Software communicate with an Arduino?
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Will GP Software communicate with an Arduino?
I am in the process of upgrading our old track to a timing track using an Arduino microcontroler. I was wondering if anyone has done this, has had any success with this, and has any tips for getting the arduino to communicate with race management software.
Thanks!
Thanks!
- gpraceman
- Site Admin
- Posts: 4926
- Joined: Fri Jun 20, 2003 12:46 am
- Location: Highlands Ranch, CO
- Contact:
Re: Will GP Software communicate with an Arduino?
If the USB driver for the Arduino creates a COM port, then it may be possible using GPRM's custom serial timer interface. I hadn't heard of anyone trying that micro controller with GPRM. So, you may have volunteered to investigate to see if it is possible. If it is not currently possible, I would not be adverse to adding in support, but that depends on how much work would be involved. Programming an interface for USB devices can be quite tricky.
Randy Lisano
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Re: Will GP Software communicate with an Arduino?
Even though it plugs into the computer with a USB cable, In the Arduino programming software, you have to select your "serial port", and mine is on "COM1". Does that help?
- gpraceman
- Site Admin
- Posts: 4926
- Joined: Fri Jun 20, 2003 12:46 am
- Location: Highlands Ranch, CO
- Contact:
Re: Will GP Software communicate with an Arduino?
If that is the case, do you know the communication parameters (baud, parity, stop bits, data bits)? Does it send the timing data in ASCII text? If so, do you have a sample of the timer's output?fidoracing wrote:Even though it plugs into the computer with a USB cable, In the Arduino programming software, you have to select your "serial port", and mine is on "COM1". Does that help?
Randy Lisano
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Re: Will GP Software communicate with an Arduino?
The Baud rate is adjustable up to 9600, you set the value in the Arduino program when it starts serial communication. It does communicate in ASC11 text, but the only only example of output that I have is what it displays in the "Serial Monitor" program that came with the programming software. I can adjust what is fed back to the computer via the serial output, so that shouldn't be an issue if I know what format the GP software is looking for.
Although its not a screen shot or anything, this is what I currently have it programed to feed back to the computer after the race is done -
Race 1
Lane 1 - 7.554
Lane 2 - 8.001
Winner - Lane 1
Like I said, I can change that to anything I want pretty much, so I can do whatever the software needs. I have it set up this way right now because it looks good with the Serial Monitor program.
Although its not a screen shot or anything, this is what I currently have it programed to feed back to the computer after the race is done -
Race 1
Lane 1 - 7.554
Lane 2 - 8.001
Winner - Lane 1
Like I said, I can change that to anything I want pretty much, so I can do whatever the software needs. I have it set up this way right now because it looks good with the Serial Monitor program.
- gpraceman
- Site Admin
- Posts: 4926
- Joined: Fri Jun 20, 2003 12:46 am
- Location: Highlands Ranch, CO
- Contact:
Re: Will GP Software communicate with an Arduino?
Sounds like it could work. You can check out the Custom Timer Interface Specs for GPRM. This details communication parameters, data formats, commands the timer supports and responses from the timer.
Looking at your sample output and the GPRM code, the first and last lines would pose a problem. The software will filter out the words but will think the number is a lane number and look for an associated time. I'll add a change for the next update to adjust the filtering so that won't be a problem, as this issue will also affect the verbose example that I list on the specs.
Looking at your sample output and the GPRM code, the first and last lines would pose a problem. The software will filter out the words but will think the number is a lane number and look for an associated time. I'll add a change for the next update to adjust the filtering so that won't be a problem, as this issue will also affect the verbose example that I list on the specs.
Randy Lisano
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Re: Will GP Software communicate with an Arduino?
The first and last lines are just in there right now to make it look pretty on the serial monitor program I have. They can very easily be taken out, along with the word "lane" before the corresponding times. I have almost complete control over what the controller sends back to the computer, so its just a matter of altering the program on the chip.
I downloaded the GPRM sample program, and I'm going to play with it this weekend to see if I can get it to work.
I downloaded the GPRM sample program, and I'm going to play with it this weekend to see if I can get it to work.
- gpraceman
- Site Admin
- Posts: 4926
- Joined: Fri Jun 20, 2003 12:46 am
- Location: Highlands Ranch, CO
- Contact:
Re: Will GP Software communicate with an Arduino?
The word "Lane" would not cause a problem and can be left in for clarity purposes.fidoracing wrote:The first and last lines are just in there right now to make it look pretty on the serial monitor program I have. They can very easily be taken out, along with the word "lane" before the corresponding times. I have almost complete control over what the controller sends back to the computer, so its just a matter of altering the program on the chip.
Something like this would take care of the issues with the first and last lines, until an update is posted:
Race=1
Lane 1 - 7.554 Winner
Lane 2 - 8.001
The first line will get filtered out altogether, as it will interpret it as non-numerical data. Any other words will get filtered out.
Randy Lisano
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
- gpraceman
- Site Admin
- Posts: 4926
- Joined: Fri Jun 20, 2003 12:46 am
- Location: Highlands Ranch, CO
- Contact:
Re: Will GP Software communicate with an Arduino?
Also, once you are done, maybe you will post details on your system for the derby community to benefit from.
Randy Lisano
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Re: Will GP Software communicate with an Arduino?
Thanks for the help and info! I'll keep you posted. We had a big snowstorm up here overnight so I don't think I will have time to play with it until tomorrow.
When/If I get it figured out, I will gladly post details. Not only may it help others, it may also help me if others find improvements to the system.
When/If I get it figured out, I will gladly post details. Not only may it help others, it may also help me if others find improvements to the system.
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Re: Will GP Software communicate with an Arduino?
We have the Arduino communicating with the software, but the results are not consistant. In the "Hardware Setup" screen, when I hit the Test Race button, the software resets the track fine, and the software recognises the "timer start message", but does not always recognize the times sent back by the arduino when the race ends. When it does recognize the times, the times are seldomly transfered over to the lane times panel, and when they are they are usually wrong.
When we start the test without the test race option, the data sent back looks like this -
66
1
1 - 0.507
2 - 1.400
66 is the Ready Response. 1 is the Timer Start Message, the last two lines are the lane times.
The only paramaters i have set up in the custom serial timer screen is the reset (A) Ready Response (66) and the Timer Start (1).
Any ideas?
When we start the test without the test race option, the data sent back looks like this -
66
1
1 - 0.507
2 - 1.400
66 is the Ready Response. 1 is the Timer Start Message, the last two lines are the lane times.
The only paramaters i have set up in the custom serial timer screen is the reset (A) Ready Response (66) and the Timer Start (1).
Any ideas?
- gpraceman
- Site Admin
- Posts: 4926
- Joined: Fri Jun 20, 2003 12:46 am
- Location: Highlands Ranch, CO
- Contact:
Re: Will GP Software communicate with an Arduino?
Any commands and timer responses should be non-numerical. That will ensure they get filtered out and are not mistaken for lane numbers or times.fidoracing wrote:When we start the test without the test race option, the data sent back looks like this -
66
1
1 - 0.507
2 - 1.400
66 is the Ready Response. 1 is the Timer Start Message, the last two lines are the lane times.
The only paramaters i have set up in the custom serial timer screen is the reset (A) Ready Response (66) and the Timer Start (1).
Randy Lisano
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Re: Will GP Software communicate with an Arduino?
I changed the commands that I had put in to non-numeric, and it seems to be working. Is there a way to run an actual race in the demo mode of the software?
I'm going to try to add more commands to the program over the weekend.
I'm going to try to add more commands to the program over the weekend.
- gpraceman
- Site Admin
- Posts: 4926
- Joined: Fri Jun 20, 2003 12:46 am
- Location: Highlands Ranch, CO
- Contact:
Re: Will GP Software communicate with an Arduino?
Glad to hear it. You can enter up to 5 racers into the DEMO ONLY group of the Sample.mdb data file that comes with the software. Then create a schedule for that group and run the heats.fidoracing wrote:I changed the commands that I had put in to non-numeric, and it seems to be working. Is there a way to run an actual race in the demo mode of the software?
Randy Lisano
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
Romans 5:8
Awana Grand Prix and Pinewood Derby racing - Where a child, an adult and a small block of wood combine for a lot of fun and memories.
- fidoracing
- Apprentice
- Posts: 24
- Joined: Fri Sep 29, 2006 8:01 am
- Location: wisconsin
Re: Will GP Software communicate with an Arduino?
Got the demo races all set up and going. Seems to be working great. I also added a "force data send" command so you can stop the timing if one car fails to finish (we are only running two lanes). I will post the programming code when we get it all set up and cleaned up.
Thanks for all your help!
Thanks for all your help!