assign4 - NET3001 Fall 10 Assignment 4 Due Oct 28 6pm...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
NET3001 Fall 10 Assignment 4 Due : Oct 28, 6pm Submitting : Use the submit.exe program. The files should be named assign41.c assign42.c You may include other files as well, if you have build libraries. Your library should include the *.c file and the matching *.h file. Overview: We are going to write some code to implement a controller for operating a combination lock. A classic high-school locker combination lock is operated by spinning a single wheel to 3 consecutive numbers, using a specific pattern. If the correct pattern and numbers are used, the lock will open. For example, if the numbers range from 0. ..11, and the lock sequence is 4,5,6, then the following operation will open the lock: spin the dial two full turns clockwise, then continue to the digit 4 (first digit) spin the dial counterclockwise, one complete revolution, passing the 4; continue to the 5 (2 nd digit) spin the dial clockwise, until you reach the 6 (3 rd digit) Part 1 of this assignment will simulate a machine that tests combination locks. Part 2 is a game, based on the same idea; it uses almost all the same code. All the code should be written in C and built to run on the MTS board. Use interrupt techniques for managing the time. You may use interrupt techniques for the keyboard (optional). Use the motor library you developed in lab 6. Part 1 Electronic Lock Tester (15 marks, assign41.c) The system operates as follows: at the beginning of a test sequence, the user adjusts the arrow on the stepper motor to point straight up (12 o'clock, 0 in our number system) the user then hits the “code” button and enters 3 digits, from 0 to 11 the system then pauses for 1 second the stepper motor begins to spin in the pattern required to operate the combination lock; the system issues a beep and a short pause when the stepper motor reaches each target number Write the code to implement this system. Arrange for the system to continuously repeat the 0 11 1 10 2 9 3 8 4 7 5 6
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
above sequence. Stepper Control As you have discovered, the stepper motor has 20 steps per revolution. But this project requires 12 positions on the circle. How do we decide how many steps are required to get to each target?
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/26/2010 for the course BIT NET3001 taught by Professor Kieth during the Spring '10 term at Carleton CA.

Page1 / 6

assign4 - NET3001 Fall 10 Assignment 4 Due Oct 28 6pm...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online