-
Notifications
You must be signed in to change notification settings - Fork 609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plays Track1+2, then ONLY Track 2 every other "press" #22
Comments
Im having the same issue except that my goal is to display both tracks 1+2 consistently after every press of the button. Does anybody know how what configurations I should do with the source code? I think it has something to do with this part of the code: void loop() //for(int i=0;i<10;i++){playTrack(1+(curTrack++%2));delay(3000);} sleep(); noInterrupts(); interrupts(); but I dont know how to modify it into displaying 2 tracks at once consistently Any help will be much appreciated |
Samy has stated that this is WAI in #31 , If you want to just run both at the same time, set the main loop to say "playTrack(1);", then it will do the run 1 forward and 2 backwards scheme. |
how should i change the code for cards which have only second line on them? |
With the current implementation of the code, the first time you press the button, it will call playTrack(1), then next time you press the button, it will call playTrack(2) (because of how it keeps track and increments curTrack)
This doesn't make a lot of sense, because when calling playTrack(1), it will actually play BOTH tracks because of this if statement within the method:
Then after playing both tracks, next time you press the button it will call playTrack(2) which will ONLY play the 2nd track because that if statement isn't satisfied.
Essentially this means that every other time you press the button, the magspoof will ONLY play track 2. All other times it will play both tracks.
This doesn't make a lot of sense, and it should probably be changed by either:
playTrack(1 + (curTrack++ % 2));
withplayTrack(1)
OR
The text was updated successfully, but these errors were encountered: