Gets user Input to turn the servo to certain degrees
user.cpp
- Committer:
- hzelayasolano22
- Date:
- 2019-01-13
- Revision:
- 3:5b6a55afc60a
- Parent:
- 2:9d9717796ab2
File content as of revision 3:5b6a55afc60a:
#include "user.h" Serial pc(USBTX, USBRX); void userInit(void) { pc.printf("\n\rType a number between 1 - 9 to move servo! \n\r"); } char GetKeyInput(void) { char c = pc.getc(); pc.printf("%c",c); return (c&0x0F); }