Gets user Input to turn the servo to certain degrees
user.cpp
- Committer:
- hzelayasolano22
- Date:
- 2019-01-11
- Revision:
- 1:f67847960b91
- Parent:
- 0:1f19faa3ee1f
- Child:
- 2:9d9717796ab2
File content as of revision 1:f67847960b91:
#include "user.h" Serial pc(USBTX, USBRX); void HostInit(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); }