Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Lab_6_WaG by
stepper.h@20:d23bcd97f2c5, 2018-03-06 (annotated)
- Committer:
- spm71
- Date:
- Tue Mar 06 17:25:48 2018 +0000
- Revision:
- 20:d23bcd97f2c5
- Parent:
- 19:ad514b1dd53f
- Child:
- 35:ad2b3d6f0e5a
implemented menu and first option in the menu.; implementing the second option
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
spm71 | 18:0e281922212c | 1 | /****************************************************************************** |
spm71 | 18:0e281922212c | 2 | * EECS 397 |
spm71 | 18:0e281922212c | 3 | * |
spm71 | 18:0e281922212c | 4 | * Assignment Name: Lab 5: WaG |
spm71 | 18:0e281922212c | 5 | * |
spm71 | 18:0e281922212c | 6 | * Authors: Sam Morrison and Phong Nguyen |
spm71 | 18:0e281922212c | 7 | * File name: stepper.h |
spm71 | 18:0e281922212c | 8 | * Purpose: Header for stepper driver |
spm71 | 18:0e281922212c | 9 | * |
spm71 | 18:0e281922212c | 10 | * Created: 03/02/2018 |
spm71 | 18:0e281922212c | 11 | * Last Modified: 03/02/2018 |
spm71 | 18:0e281922212c | 12 | * |
spm71 | 18:0e281922212c | 13 | ******************************************************************************/ |
spm71 | 18:0e281922212c | 14 | |
spm71 | 18:0e281922212c | 15 | #ifndef STEPPER_H |
spm71 | 18:0e281922212c | 16 | #define STEPPER_H |
spm71 | 18:0e281922212c | 17 | |
spm71 | 20:d23bcd97f2c5 | 18 | #define SPI_DRV8806_ID 2 |
spm71 | 18:0e281922212c | 19 | #define DRV8806_SPI_NO_BITS 8 |
spm71 | 18:0e281922212c | 20 | #define DRV8806_SPI_MODE 0 |
spm71 | 18:0e281922212c | 21 | #define DRV8806_SPI_FREQ 1000000 |
spm71 | 18:0e281922212c | 22 | #define STP_CW 0 |
spm71 | 19:ad514b1dd53f | 23 | #define STP_CCW 1 |
spm71 | 18:0e281922212c | 24 | #define STP_POS_UNKN -5 |
spm71 | 18:0e281922212c | 25 | #define NUM_SENSORS 8 |
spm71 | 18:0e281922212c | 26 | |
spm71 | 18:0e281922212c | 27 | |
spm71 | 18:0e281922212c | 28 | #include "mbed.h" |
spm71 | 18:0e281922212c | 29 | #include "io_pins.h" |
spm71 | 18:0e281922212c | 30 | |
spm71 | 18:0e281922212c | 31 | void stp_init(); |
spm71 | 18:0e281922212c | 32 | void stp_step(int direction); |
spm71 | 18:0e281922212c | 33 | |
spm71 | 18:0e281922212c | 34 | |
spm71 | 18:0e281922212c | 35 | #endif |