Picaxe Laser Tag

Laser_Tag_-Helmet.bas (2481Bytes)
Laser_Tag-_Gun.bas (632Bytes)

Well hi!!!

Glad to apart of the community.

Got some questions about my system, i'm not so confident with myself.

What is the cheapest sound effect system (for gun sounds) is there?
multipelxing 16 LEDS on 8 pins........HOW THE HELL??
Can some one tell me if this code looks good (in attachments), the gun code DOESN"T HAVE THE MULTIPLEXING LEDS code in it

Thanks guys, I will make a robot next project i promise!

Wow!!! I am always excited

Wow!!! I am always excited when somebody else wants to build a lasertag system! I am making one too and almost finished. If you want we can also talk about it on skype (user: “frsmnk”).

Now to your post. Cheapest sound effect, probably it’s the ISD chip, but you get a crappy audio quality (like 8Khz sampling, instead of the 44Khz that comes out of your pc). I used an arduino waveshield on mine which plays audio off an SD card at 44KHz at most. But the libraries are in c, because they are made for the arduino/atmega. Then there are those cheapo sound modules for record/playback that you can usually find at 10$ which have buttons for play and record (you can easily control them with your MCU with transistors).

About the LEDs…i don’t really get why you’d need to multiplex so many LEDs, what are they for?

Oops yeah forgot to mention
Oops yeah forgot to mention that. The LEDS are for displaying ammo and health. Each part has it’s own Picaxe, so people can pickup and drop guns if they want. I chose LEDs instead of a LCD because they were cheaper and I have had expirience with them.

How crappy is 8khz, it doesn’t need to be great just a “bang bang”, “click click” and “chick chick” is all I need.

Oh i got it. Don’t know much

Oh i got it. Don’t know much about multiplexing of LEDs but i’m sure other guys here do know. There are some 8/7 segment controller ICs in case you run out of pins on your picaxe though.

If you just need simple audio then something like this would be ok https://www.robotshop.com/letsmakerobots/node/3522?s=l or even 8KHz recorders. 

One last thing: if you want it to be a simple/fun project then picaxe is ok, if you want to make something more “serious” i wouldn’t be too sure. Right after i made my first robot the project i focused entirely on lasertag. At that moment i only had picaxes and i quickly understood that picaxe wouldn’t be the right way to go…but it all depends on your intentions, if it’s just one of the many projects you want to make build it’s ok i guess, in my case (my focus was entirely on lasertag, i wanted to make a real cool system) then not really.

Hope this was helpful :=)

 

back to your code:

i don’t get why you are using 3 irin functions in your helmet.bas file.

I too am getting to know

I too am getting to know multiplexing, more for LED arrays but I know where you’re going. May I suggest…

http://www.electronics-tutorials.ws/combination/comb_2.html

It helped clear up what was mux nonsense to me. I had another that showed how to link a 3-8 demux to a decade counter but I can’t find it. I’m ot sure you really need that anyways for what is probably a few strings of indicator LEDs.

The 3 IRINS are for the

The 3 IRINS are for the three IR sensors on the helmet.

I do have many projects but the picaxe seemed to be the best to use. We might need to talk on skype some  time about this, it was amazing that someone else is also making one.

Do you reckon that those sort of sound effects needs to be good quality?

THANK YOU JAX, very glad about the clearing up about multiplexing!

Uhm, actually there are

Uhm, actually there are quite a few systems out there that use 8KHz so i guess it’s ok after all. I really do not know the big difference between the two as i never heard an 8KHz sound being sampled.

I am not sure how the IRINs work but i guess they’ve got some sort of timeout if they don’t receive anything right? If that’s the case it might happen that while you’re not checking a receiver the code is actually there (but “software” is not). What I did and what other systems out there did is just have the receivers share the same input pin. This both saves pins on the picaxe (especially if you’ll eventually decide to add more), makes things easier to code and you solve the “what if the code comes while i’m not checking the sensor?” problem!

:=)

As for the picaxe, unfortunately it’s not the best to use :frowning: . Trust me, i’ve spent days trying to work that out and realized arduino did the task much better. But still it can be done, especially if you’ve got those cool X2 models.

I’ll do some research on the

I’ll do some research on the sampling, I don’t mind if a peizo does the sounds. Its my friends I’m making it with (although I’m doing it all) they want the ‘proper’ sounds.

It does have a timeout period of 500 milliseconds, hoping thats enough.

I was wondering if they could share the same pins!!! THANK GOODNESS for that!!! I spent a bit trying to make them all work together, if only i knew.

I DID start out with the conscept of using an arduino but i wanted to keep the costs as low as possible, for a robot i would use a arduino but for a laser tag gun i would go for a picaxe :S. I choose the 18M2 for both the helmet and the gun, its cutting it very fine as all the pins are used on the gun with the multiplexing!

I haven’t actually got any of the parts yet bite lip, I didn’t want to get anything till i thought the code was working in theory. I have this thing about saving every last cent

I’ll tell you what: you can

I’ll tell you what: you can have a single atmega328 to handle everything, from receiving to sending, so maybe that would actually be cheaper! With the picaxe i’d say having 2 is better.

…that is if you haven’t got the picaxes yet!

 

consider that you only need a single board for programming, then if  you want to make multiple systems you can just use the single atmega chip instead of the whole board.

I haven’t bought a bit

I haven’t bought a bit yet

See I’m using two as i said before: 1 for the gun and 1 for the helmet. So the atmega is cheaper? The would be good but that means changing the code for the third time :,( I was hoping to get it done before exam week, 2 weeks from now.

What are you using? I know i can’t keep scimping on things cause they are expensive but you know

Well i’ve already written

Well i’ve already written the code for my arduino lasertag, so if you want i can share it and explain how it works so you can modify it as you like! 

As i said before i’m only using a single arduino board that i’m using as a programmer, while on the lasertag board i only have a single atmega chip (not the whole board) and that is waaaay cheaper (should be like 4$ for an atmega328).

We could team up to make a better laser tag! :smiley:

I would be great to atleast

I would be great to atleast just look at your code, to see how you did things. If thats ok.

Thats smart thinking right there, but the thing i love about the piaxe is that you don’t need a programmer. Is there a way to do a simialer thing with the atmega?

Also what atmega are you using?

I like this teaming up idea. My friends im working with are…not the brightest: one has never touched code or electroinic but had the idea, the other has only started learning basic and logo since july and never touched electronics before :S. So yes i do believe we could work together to make a good system! btw i have added you to skype

Yay!! Let’s work together!!

Yay!! Let’s work together!! :smiley:

Btw : Even the atmega doesn’t need the programmer if you “bootload” it (or if you buy it already bootloaded). Still the arduino duemilanove board is still useful because it lets you program the chip with USB instead of having you make the circuit for doing that, so i highly reccomend having at least 1 board. In fact i called it programmer but i don’t really use it as a programmer, more as an “uploader” (even if it can also be used as a programmer).

Summarizing up stuff:

Arduino duemilanove can be used as an uploader or as a programmer. A programmer can be used to program chips with no bootloader or to bootload them. Once you have a chip with a bootloader you only use the board (or some other FTDI cable) to upload the program to the chip.

Btw i’m using an atmega328.