So for this as well, we will print “b4464” one character at a time. Lets program the Key 1 of the keypad to increase our health to 100% in GTA ViceCity and the Key 2 to add a gun and grenade in our loadout in Counter Strike.Īs many of you might know the cheatcode to increase the health to 100% in GTA ViceCity is “Aspirine”, so in our code as well, we will write “Aspirine” one character at a time.Īlso, in Counter Strike, you can press the key combination of “b4464” on your computer keyboard to add a gun and a grenade in your loadout. Control Games like Counter Strike and GTA ViceCity Key A should play/pause the music, Key B should play the next song and Key C should play the previous song. You can compile and upload this code to arduino to test it out. Similarly for Case “B” and Case “C”, we can use Consumer.write(MEDIA_NEXT) and Consumer.write(MEDIA_PREVIOUS) respectively.You can find the list of all of these contants from the NicoHood library documentation Here, we have used the write method from the NicoHood library and have used the MEDIA_PLAY_PAUSE constant to play/pause the music. Goto Case “A” of the switch case and there delete the Keyboard.println statement and write the following line of code instead:.Let’s program key A of our keypad to Play/Pause the music, the key B to play the next song in the playlist, and the key c to play the previous song! Step 2: Programming the Keys Control Music – Play/Pause the song, Play next/previous song: We can program what we want each specific key to do in the case of that key. In the code, you will notice that their is a switch statement containg cases for each key of the keypad. You can change this code according to the digital pins that you are using. As I’m using the pins from d4 to d11, I have mentioned the same in the code as well.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |