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
Diff: laser.cpp
- Revision:
- 42:6cba679a4ee4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/laser.cpp Thu Mar 29 15:51:52 2018 +0000 @@ -0,0 +1,65 @@ +/****************************************************************************** +* EECS 397 +* +* Assignment Name: Lab 6: WaG +* +* Authors: Sam Morrison and Phong Nguyen +* File name: laser.cpp +* Purpose: Contains laser functions +* +* Created: 03/29/2018 +* Last Modified: 03/29/2018 +* +******************************************************************************/ +#include "mbed.h" +#include "io_pins.h" +#include "spi.h" +#include "laser.h" + +extern DigitalOut laser; +extern Serial pc; + +/* + * void lzr_off(); + * Description: turns the laser off + * + * Inputs: + * Parameters: + * Globals: + * + * Outputs: + * Returns: void +*/ +void lzr_off() { + laser = 0; +} + +/* + * void lzr_off(); + * Description: turns the laser on + * + * Inputs: + * Parameters: + * Globals: + * + * Outputs: + * Returns: void +*/ +void lzr_on() { + laser = 1; +} + +/* + * void lzr_init(); + * Description: initializes the laser + * + * Inputs: + * Parameters: + * Globals: + * + * Outputs: + * Returns: void +*/ +void lzr_init() { + lzr_off(); +} \ No newline at end of file