![]() After discussing with the professor, we were told that there was a way to solve this problem, that is, to use a relay. As we want the whole machine to be controlled by our Raspberry Pi, we need to find a way to control the on and off of this shuffler by GPIOs and circuits. In the original shuffler, the user has to press a physical button so that two electrical lines inside would be connected and the shuffler would start to work. ![]() To solve this issue, we decided to add a supporting card board between the servo and the ground of our machine so that the vertical position of the servo could be maintained.Īs the shuffle was also bought from Amazon, it was designed to power by four LR14/C batteries, which were much more powerful than the circuits we used to control servos and motors. This resulted in that when a full deck of cards were placed at the top of the scissor lift, the gravity might cause the scissor lift to stop moving and two gears sliding. Another problem we have met later was that we found that the servo, as attached at the bottom of the scissor lift, was still not so precise vertically due to the gravity so that two gears were not biting perfectly. To make this baffle as smooth as possible, we used a small plastic baffle from the car given in Lab3 and two screws to attach it to the surface of the scissor lift. Therefore, we decided to add a baffle outside these two gears so that they must be in one plane vertically. Then, after powering the servo and tested the whole system, we found that when the scissor lift was lifting up, the circular disk was able to slide in and out so that the two gears were no longer biting together. And then, we used screws to attach two gears, which we have chosen carefully so that these two gears could bite together according to the distance between the center of the circular disk and the servo, with the circular disk and the servo respectively. To achieve this design, we decided to attach the servo at the bottom of the scissor lift and glued them together. Therefore, we decided to use a servo and a pair of gears to rotate the circular disk to control the up and down movement of the scissor lift. Similarly, by rotating it counter-clockwise, the scissor lift will gradually drop down. By rotating a circular disk clockwise on the side, it will cause the scissor lift to lift up. ![]() The main part of the scissor lift came from a toy car we bought from Amazon. In this way, it could receive cards from the shuffler at a lower altitude and then be lifted up so that the rotating arm could split the cards into two half decks back to the shuffler. The reason we need scissor lift is that we want to move a deck of cards vertically. The Python GUI of the project Scissor Lift To quit the program, the user can also press the QUIT button at the central button of the screen. Now, the user can press the START button in the middle of the screen to start the whole shuffling and dealing procedure. After setting the game mode, the GUI will automatically switch back to the main menu and the information of the current game mode will be shown at the down right of the screen. And in the Shuffle Only mode, there is nothing to choose because this mode is used to just shuffle but not dealing. However, in User Defined mode, the user needs to define all three features of the game: number of public cards, number of players and number of cards per player. Therefore, the user only has to choose the number of players. As known to all, Texas Hold'em has five public cards and two cards per player. In this page, there is a list of games to choose, for example, Texas Hold'em, Show Hand, Fight the Landlord, Shuffle Only, and User Defined. If the user presses the Mode button, the GUI will switch into a second interface: the mode choosing interface. By default, the mode is None, which means we don't need the machine to deal cards, instead we just need it to shuffle. On the right side, there is a button named Mode at up right and an information displaying part to show the information about the current mode at down right. The user can press the minus and add button around the number to adjust the shuffling times. ![]() The left part is used to show the number of shuffling times the user wants (by default 2). In the main interface, the screen is split into two parts: left and right. Following this idea, we decided to build several interfaces, including the main interface, the mode choosing interface, and so on. Therefore, the GUI should has the functionality to let users easily choose how to shuffle and how to deal the cards. As defined, our project is a cards shuffling and dealing machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |