Okay so I designed a device to help a user count cards in Blackjack. The idea is to have a nano board wired with a tactile switch in each shoe and servo strapped to each leg. User can click left shoe for low card, right shoe for high card, code evaluates and servos notify user to bet soft or hard. I have wired a prototype and strung some code together, I am new to the C language and Arduino as a whole, this is my first major project. I can't seem to figure out why my code wont work. Hopefully I commented it well enough for you understand what I'm trying to make my sketch do. I'm open to all input, chop my code up, rewrite it entirely, whatever. All I ask is that it's well commented so I can understand whats going on. Still learning C you see.So here is what I came up with so far.

//Here I want declare the starting values for up to ten decks. I'm going with the standard +/- system for counting. //To keep the device from telling me to bet to hard to often I took a conservative angle and flagged cards 2-9 as low // and 10,J,Q,K,A as high from which I got the formula (-32) + 20 = -12/Deck.char Shoe_Value(-12 -24 -36 -48 -60 -72 -84 -96 -108 -120) ;

void Dealer_Reshuffle() { // Set servos back to home position and restart the card count Left_Servo.write(90) ; Right_Servo.write(90) ; Card_Count == Initial_Deck_Value ; // Reset card count Game_On() ; // Back to top of Game_On() function} Also another problem that I have is with servo noise. Anyone who has ever worked with a servo knows about the audable "dzzzt" "dzzzt" that most servos make....Naturally this would be problematic in a casino. I wired up a servo to a potentometer and notice that the servos hardly make any noise when the move "slowly". I'm sure there is probably a way to control servo speed with code that I haven't figured out, any help in this department would be greatly appreciated.That's pretty much what I'm working on right now. I have a diagram I made in fritzing I hope it uploads.Thanks in advance

I have lived in Las Vegas and will be retiring there next year. I have counted cards and was even asked to leave a casino -- although not trespassed. I also worked for two and a half years as a casino employee -- admittedly in marketing, but interacted with security almost daily.

That being said, here's my honest advice:

The use of an electronic device to aid in the play of any casino game is a felony.

There are sensors in many of the casinos that scan for the EM signature of home-brew devices such as the nano. You will need to heavily shield your device to avoid disaster.

The use of pager vibration motors can give you the feedback you desire without the problems of a servo.

There is no need to complicate your design by using both shoes. You can count up and down with buttons in the same shoe. One under the big toe and one one the side of the foot, for instance.

You can purchase a pair of "elevator" shoes which would give you lots of space for the nano and batteries.

These things can get hot. Allow for this as you design.

A simple up/down counter implies a simple one-level (all cards have a value of +1, -1, or 0) count. If you're going to use an illegal aid, at least optimize it to the more advanced multi-level counts.

Card counting, while appearing to be daunting at first blush, isn't really that hard. I understand the lure of using technology but if your goal is to make money, you might just be more profitable using a single-level count like Synder's Red Sevens. There are plenty of others, but the advantages are in the 1/10ths of a percent.

Know that the casinos are not idly sitting around while armies of counters take their money. They have instituted "no mid-deck entry" to cancel "Wonging" a deck (worth the Google search). They also now have computer systems that automatically keep the count and identify who is varying their bets according to the count.

An expert (electronic or mental) card counter finds it hard to make much headway with the casinos' counter-measures. There are WWW sites that are dedicated to countering the countering.

But, I digress.

Be sure that you risk being trespassed at a casino that you don't want to later visit. I play tournament poker and would be foolish to count at a casino that hosts large poker tourneys, for instance.

Last thing: The casinos have found that so many clients carry a cell phone, they ignore the EM signatures of these devices. So maybe your best bet (pun intended) would be to use an Android or iPhone in your shirt pocket and a modified Bluetooth keyboard in your shoe.