At first, my English may be a bit crappy, because I'm Dutch, but I hope you all can understand what I have to ask :).
I am currently building a lasergame based on a Arduino. It uses IR to fire at each other, resulting in a who and a what. These are two bytes. I uses the tutorial on IBM (Google: arduino lasergame).
But now I want the data of who shot who down, and so on, beiing transfered to the computer. After that the computer has got to put this into a table, so that you can see who won, and who shot who for how many times.
Now I already did brainstorm on this project.
Solution one: directly transmit over RF. Is this possible? I mean, when there are like ten playes, there are going to be multiple signals at once, resulting in a lot of noise. Now, I am not an expert on RF signals, but aren't there solutions for this? I mean, when you have remotely controlled cars/planes, they all react to their own remote. And also, is there enough reach for these signals?
Solution 2: store the data on the arduino, or on a external chip. Then, when the game is done, transfer the data to a computer by USB, or via RF (one by one). Is this a handy way to do it? The EEPROM isn't big enough right?
If just anybody can help me, would like to brainstorm, or has a crazy idea? :)
RC cars and planes operate in a frequency band. Within that band, there are sub-channels. For several cars or planes can operate at the same time, the each have to be on a different sub-channel.
Typically, the inexpensive RF transmitters do not offer the choice of sub-bands, so, several in the are will interfere with each other.
Xbee radios do allow you to assign unique ID's to each one, within a PAN (an area network). So, interference is not a problem. Cost might be, though, once you add in a shield.
Range is another consideration. Generally, the more you pay, the greater the range.
However, unless you need real-time data, storing the data on an SD card on a shield might be the easiest way to go. Play the game, then collect the SD cards, and copy the data onto the PC, and see who won. You can timestamp the data, so you know not only who hit who, but when.
Yeah, SD cards might be a solution :). Also there are external eeproms, are these handy to work with? What I thought was to collect it on one of these two, and when all the players are back, they are sended one by one to the computer. Computer sends: 1, and gun 1 reacts by sending the score from a SD, EEPROM, or USB stick.
But let's say you want to work with multiple sub channels. Hoe does the computer recieves this, does he needs a reciever for each channel?
You could easily use xbees all connected to the same frequency, channel and baud rate. If you add a prefix to each signal sent from them then the computer (which is receiving the serial data, could interpret which unit sent the code.
To avoid two codes being sent at once and interfering, causing the computer to receive a load of rubbish, you could have each 'sending' unit check the input serial feed for data before it sends its data.
Should be relatively simple like that. You could alse then have the units communicate with each other to determine who hit who before the data is sent to the computer. You would just need different prefix codes so the computer ignores those communications.