Priyank Kalgaonkar
/
TALab3BJoystickECE595
ECE595 - Lab 3 Part 2 - Joystick Program - TA
main.cpp
- Committer:
- priyank12p
- Date:
- 2021-01-16
- Revision:
- 1:af23cbc41990
- Parent:
- 0:4cb6e9d0da34
- Child:
- 2:af5f9d175643
File content as of revision 1:af23cbc41990:
#include "mbed.h" DigitalOut buzzer(D2); DigitalOut led_green(LED_GREEN); InterruptIn sw2(SW2); void sw2_release(void) { led_green = !led_green; buzzer = !buzzer; printf("On-board button SW2 was released.\n"); } int main() { sw2.rise(&sw2_release); while (true) { } }