Gets user Input to turn the servo to certain degrees
user.cpp
- Committer:
- hzelayasolano22
- Date:
- 2019-01-13
- Revision:
- 2:9d9717796ab2
- Parent:
- 1:f67847960b91
- Child:
- 3:5b6a55afc60a
File content as of revision 2:9d9717796ab2:
#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); }