Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include "Lock.h"
- #include "Speaker.h"
- int main(void) {
- int n;
- LOCK_GenerateLock(); /* generate a new lock of type 'unsigned int' (32bit) */
- /* From here on you can test your key with the lock using the LOCK_Test() function.
- * LOCK_Test() returns the number of correct bits for a given test key:
- * Use the bit operations you have learned to find the correct key number.
- * For each bit found or not found, play a sound with the loud
- */
- n = LOCK_Test(5); /* check number of correct bits */
- SPEAKER_Play(1000,200); /* play 1000 Hz for 200 ms */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement