Using USB as activation key

I am currently working on an airsoft time bomb with a horn speaker for when it goes off.

I once saw this in a project on Youtube where a person had 2 USB keys for a Domination mode.
If one USB key was plugged into the bomb, the bomb knew this team currently had the bomb.
If the other key was plugged in, the timer of the first team stops and the other team gets points.
The first team that reached a certain amount of points won.

What do I need to get input like that from USB keys to my Arduino?
Any tutorials?

You need a USB host (master) to be able to read USB Keys (a slave device, such as a memory stick).
Start researching that. Typical 328/2560 with USB/Serial adapter can't do it. Boards with a chip such as MAX3421E are needed.
https://www.google.com/#q=arduino+max3421e+usb+host+shield

compy111, starting multiple threads asking about the same thing is a no-no here.

I found this now
http://eud.dx.com/product/diy-ch376s-usb-flash-drive-read-write-module-deep-blue-844382631

It's just that is has no library or something, seems like everything is in bits.

@crossroads @goforsmoke Honestly, I forgot I already asked it yesterday :stuck_out_tongue:

compy111:
I once saw this in a project on Youtube where a person had 2 USB keys

SD Cards are probably a better choice.

Code and docs are in Chinese, on a Chinese site. CH376资料.rar_免费高速下载|百度网盘-分享无限制

I've been through similar. I quit buying boards from DX.com, anything that I need docs for.

SdFat.h library I believe can support 2 SD cards at the same time. Not clear to me if that is needed.

compy111:
If one USB key was plugged into the bomb, the bomb knew this team currently had the bomb.
If the other key was plugged in, the timer of the first team stops and the other team gets points.
The first team that reached a certain amount of points won.

Just wire some buttons (1 per team) or connect a cheap keypad and give each team a number.

Last one pressed pwns da bomb.

Button can be a wire, all you need is to ground a pin.

GoForSmoke:
Just wire some buttons (1 per team) or connect a cheap keypad and give each team a number.

Last one pressed pwns da bomb.

Button can be a wire, all you need is to ground a pin.

That's a good idea but that doesn't work for seek and destroy where they need to go to one of two locations where a USB key is.

Also dx.com seems to be broken, can't place my order, it gives me this message in even worse English than I use: "Your order fail placed."

Does it have to be a USB key? Would a dongle do?

You really don't want to buy that thing. It will take a LOT of know-how to get it working.
Once you do, you have to code reading a file and parsing the data. Not beginner stuff.

Dongles are old PC software security devices that usually plugged into a serial or game port and connected certain pins. The software would manipulate the port to safely read the pins, see what it expected and run the program. Good ones also had a pass-thru that let you use the port for serial or joystick.
Making and coding for dongles would still be a challenge for more-than-beginners here. The cost in parts should be well under 5 bucks for a header, some sticks of pins, wire and epoxy. The cost in time should be far, far less than going into USB or even SD cards.

Dongle would just be a 4-pin connector with perhaps I2C interface to a memory chip, and power/Gnd. Similar to USB, but much easier to code for.

Another good option...
https://www.maximintegrated.com/en/products/digital/ibutton.html

If you like to add complications just because you can, you will make more things expensive than necessary. My design teacher taught us that but he did graduate a Bauhaus type school. Less really is more when it comes to manufacture.

With 4 pins, 1 being ground I can make at least 7 keys for next to nothing each that don't need any more special code than read 3 inputs as bits. NO protocols. NO timing. NO unnecessary frills to code for. Cost: next to nuthin in parts and code that a beginner might learn to fully grasp in less than a month.

Well, for a $1.28, a 0.1uF cap, and two 4.7K resistors, you can have all kinds of storage space.
http://www.digikey.com/product-detail/en/cypress-semiconductor-corp/FM24CL04B-G/FM24CL04B-GRA-ND/3788983

I2C memory libraries are easy to use, and way more than 7 options would be available.

This is for something that airsoft teams pick up at one location to identify control to a simulated (horn) bomb device in another place.

If it was for a home or car lock or some kind of passkey that matters, I wouldn't be face palming.

How about RFID-tags instead of USB? Probably easier to do with an arduino and you don't have to worry about water or dirt.

lg, couka