Will GP Software communicate with an Arduino?

Discussions on race preparation, race management, sound effects, and other race related software. This is only for software provided by our sponsor, GrandPrix Software Central.
User avatar
fidoracing
Apprentice
Apprentice
Posts: 24
Joined: Fri Sep 29, 2006 8:01 am
Location: wisconsin

Re: Will GP Software communicate with an Arduino?

Post by fidoracing »

I got your e-mail with your modified code in it the other night, I just haven't had a chance to really look it over yet. From what I have seen it should work, but I want to look more closely.

I have not tested a 4 lane version of this track. I was going to build one for a Cadets group near me, but they decided to buy a whole new track instead. What I would suggest would be to mock up the set up before you install it on the track, and test it that way. Modifications are much easier to make that way.

I have class all morning today, but I should have time to look your code over this afternoon.
CaveGimp
Apprentice
Apprentice
Posts: 10
Joined: Wed Oct 27, 2010 9:13 pm
Location: Queen Creek, AZ

Re: Will GP Software communicate with an Arduino?

Post by CaveGimp »

First, THANK YOU to fido and gpr. GPRM rocks and fido you really simplified my life. Of course I couldn't live with it being simple so I took your specs as a starting point and expanded the system for a 6-lane track with 7-segment LED displays to replace the single LED win light. I used a MAX72xx chip to control the displays which opened up more pins for 6 lane sensors. I may have messed up the code a bit when I expanded to 6 lanes as in the test mode I can reset the timer, start the timer, but no finishes are regisitared nor do the times pass through. The race is tomorrow so it looks like a long night of educating myself on programming. I'm an engineer so I know Fortran and those based on it much better. I can post pics of the track/timer and the modified circuit and code next week sometime. Even if I can't get the Arduino to talk to GPRM I can use the serial window for the times the displays clearly show who placed where.

On a side note I have been building the track in the past two weeks as well, so there are a lot of kinks to work out on both track and timer. Over the next year I plan on adding a 4-digit 7-segment display over each lane to display the time. I have all the bits, just not the time to solder it all together tonight. :)

Again THANK YOU to gpr for the great software, and fido for you design.

CaveGimp
aka Glenn
K7GET
User avatar
gpraceman
Site Admin
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?

Post by gpraceman »

the_stryder wrote:Has anyone done a 4 lane version of this program yet?
I heard from a couple of people that said they were going to build a 4 lane version. Hadn't heard back from them yet.

If anyone sends me some good firmware for a 4 or more lane Arduino timer, I will post it on the GrandPrix Race Central website.
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.
User avatar
fidoracing
Apprentice
Apprentice
Posts: 24
Joined: Fri Sep 29, 2006 8:01 am
Location: wisconsin

Re: Will GP Software communicate with an Arduino?

Post by fidoracing »

A few observations looking at your code:

In the "void setup" section, you have to call out all of your I/O pins as either inputs or outputs. If you look, you copied "pinmode(fin1, INPUT);" from my origional code, but never expanded it to include the four new lanes. I'm assuming that its not recognizing the signal from the lane sensors as an input, and the four new lanes are never finishing.

I'm also pretty sure you will have to call out pins 14, 15 and 16 in the void setup too.

Also, I'm not sure how the "int ln1 = ' ';" will play out in the code. As far as I know, if you put in = sign behind the interger, you have to give it some kind of value. Try taking the = and quotes off, see if it helps.

In the GPRM software, make sure that all of your communication bits are set correctly in the custom timer setup, and that that you have it set up for 6 lanes in both the hardware setup and software setup. I have had a lot more luck debugging that software using the "test function" in the custom hardware setup screen than trying to run an actual race. Check the Comm Port setting too, some computers like to move that around on you.

I'm interested in using the 7 segment numbers on our track. If you have some time, can you send me some info about the MAX72xx chips you use?
CaveGimp
Apprentice
Apprentice
Posts: 10
Joined: Wed Oct 27, 2010 9:13 pm
Location: Queen Creek, AZ

Re: Will GP Software communicate with an Arduino?

Post by CaveGimp »

Just got done with the race. It was a long day, but it worked out great. I ended up not being able to use the GP, so I just copied the lane times from the serial monitor to Excel. It was tedious, but worked. Now I have a year to get it working with the GP software. :) Thanks for the suggestions, I now have a couple starting points to debug. I'll post up more about the 7-seg displays after I recover from a long night and a great race day.
the_stryder
Apprentice
Apprentice
Posts: 2
Joined: Sun Jan 09, 2011 5:56 pm
Location: Vancouver, WA

Re: Will GP Software communicate with an Arduino?

Post by the_stryder »

Looks like I finally have my simple 4 lane setup running. Once I get the final assembly on the tracks in place, I will get pic's and documentation together and see if we can get it posted. Looks like the Arduino is the way to go.

And a huge thanks to Fidoracing for all the feedback on the code and debugging!
CaveGimp
Apprentice
Apprentice
Posts: 10
Joined: Wed Oct 27, 2010 9:13 pm
Location: Queen Creek, AZ

Re: Will GP Software communicate with an Arduino?

Post by CaveGimp »

Well now I have a 4-lane setup for the Space Derby and a 6 lane version for the Pinewood Derby. The 4-lane uses the same setup on the Arduino board, I just don't hook up two lanes. I also have 7-segment displays that I made myself. I used 3 LEDs per segment, each with their own 200ohm resistor. Lots of soldering but instead of $15 per display they were less than a dollar. I used the MAX7219 chip to control the displays without out taking up all the outputs on the Arduino. Below are a couple of pics of the Space Derby finish line and the setup. I used CAT5 wire (4 pairs) to connect to the displays since I had a bunch lying around and I needed 8 wires to connect to the displays. I also use CAT5 to connect to the sensors. All that stuff will go into a box and there is a back to the finish line so it will look all neat and tidy.

Again many thanks to Jason for the initial code and layout. I lost my drawings (hand drawings) for the 6-lane setup, but if I find them I will post.

My big issue is I still can't get things to work with GPRM v10. Would a different version work? The issue I am having is sending the "FINISH" command to GPRM and then the lane times. Any help would be awesome.

Image
Image
Image
User avatar
gpraceman
Site Admin
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?

Post by gpraceman »

CaveGimp wrote:My big issue is I still can't get things to work with GPRM v10. Would a different version work? The issue I am having is sending the "FINISH" command to GPRM and then the lane times. Any help would be awesome.
Have you checked out the interface specs for GPRM? Look for the "How can I get my home-built serial timer to communicate with your software?" FAQ at http://grandprix-software-central.com/s ... ategory_17.

No command is needed. Just send the times to the software once the timer has them. Of course, they would need to be formatted properly so the software can extract the times and lane data.
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.
CaveGimp
Apprentice
Apprentice
Posts: 10
Joined: Wed Oct 27, 2010 9:13 pm
Location: Queen Creek, AZ

Re: Will GP Software communicate with an Arduino?

Post by CaveGimp »

A FAQ what a crazy idea. :wall: Stupid me for not looking there first. Thank you.
CaveGimp
Apprentice
Apprentice
Posts: 10
Joined: Wed Oct 27, 2010 9:13 pm
Location: Queen Creek, AZ

Re: Will GP Software communicate with an Arduino?

Post by CaveGimp »

OK so the debug file and the FAQ helps but I am getting stuck with the data being noticed.

In the "Hardware Setup" window in the testing area I can talk to my timer, the reset works. I can also start a race, with the correct output coming up. Then when all lanes finish the lane numbers and times show up. The problem is when I hit the "Test Race" button. Again the timer is reset, GPRM detects the start of the race, but then it won't detect the end of the race. The log file has the following lines:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Time: 10/16/2011 02:48:50:01 PM App: GrandPrix Version: 10.0.1905.0
Group: 'Test/Tie Break' Round: 0 Heat: 0
Timer: Custom Port: COM3
Raw Data:
F<cr><lf>
1 0.882 <cr><lf>
2 1.614 <cr><lf>
3 2.397 <cr><lf>
4 3.588 <cr><lf>


Filtered Data:
f 1 0.882 2 1.614 3 2.397 4 3.588

Tokens Found:
'1', '0.882', '2', '1.614', '3', '2.397', '4', '3.588'


This looks like GPRM is getting the data, but why is it not ending the race? Is there a delay I need to code into my timer or something else?
User avatar
gpraceman
Site Admin
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?

Post by gpraceman »

How many track lanes do you have the software set for? If this is set for more than 4 lanes, the software will wait for the data for the other lanes to show up.

Do you have the custom serial timer screen set to a precision of 0.001 secs? If set less than 0.001 secs, the software will think there is missing data and it will wait for it to show up.

What is the "F" for?
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.
CaveGimp
Apprentice
Apprentice
Posts: 10
Joined: Wed Oct 27, 2010 9:13 pm
Location: Queen Creek, AZ

Re: Will GP Software communicate with an Arduino?

Post by CaveGimp »

First, THANK YOU for you help and quick response. I don't know of many "vendors" who are this responsive. You rock.

:wall: :wall: :wall: :wall: I wish there was stupid smiley for me to post. I changed the precision to .001, not .0001 and all is working. That has been my issue all along and I just didn't pay attention to details. I feel really dumb right now. Thank you for your help and great software. I will be upgrading to v11 soon as a way to say thanks.

Do you have any stickers or something I can post on my track to advertise for you? Again THANK YOU.

CaveGimp
aka Glenn
K7GET
User avatar
gpraceman
Site Admin
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?

Post by gpraceman »

CaveGimp wrote:I changed the precision to .001, not .0001 and all is working.
I'm glad you got it working now.
CaveGimp wrote:Do you have any stickers or something I can post on my track to advertise for you?
No, but I should probably get something made up.
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.
User avatar
fidoracing
Apprentice
Apprentice
Posts: 24
Joined: Fri Sep 29, 2006 8:01 am
Location: wisconsin

Re: Will GP Software communicate with an Arduino?

Post by fidoracing »

Don't feel bad. When I wrote the origional program, it took me and two of my electronics buddies about 5 hours of banging our heads against the wall to figure out that we couldn't use numbers as communication bits. The GPRM kept getting confused as to which numbers were the times, and which were the comm bits. Got that figured out, we had it up and running in less than 10 minutes. Very happy to get it fixed, but also very frustrated that the problem ended up being so simple.
CaveGimp
Apprentice
Apprentice
Posts: 10
Joined: Wed Oct 27, 2010 9:13 pm
Location: Queen Creek, AZ

Re: Will GP Software communicate with an Arduino?

Post by CaveGimp »

So I am back 2 years later. After many very successful races I am again having issues with the Arduino based timer and GPRM playing friendly. I had a hard drive go bad on my comp, got it back the other day and no the software doesn't work. The issue I have is the timer sends the data to GPRM, it comes up on the testing screen, but then GPRM waits. If I manually reset the timer and trip the start gate again the data is again displayed, but now GPRM accepts the data send. Exact same sent data so I can't figure it out. This time I do have the precision set correctly and the number of lanes correct. The debug file is similar to the one I posted earlier. After the race today I will post the latest debug file.

Why does it always get mad the day of the race. grr...........
Post Reply