aa
Dependencies: mbed
main.cpp@0:150ac7021bae, 2014-12-15 (annotated)
- Committer:
- physicraftls
- Date:
- Mon Dec 15 01:03:30 2014 +0000
- Revision:
- 0:150ac7021bae
aa
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
physicraftls | 0:150ac7021bae | 1 | #include "mbed.h" |
physicraftls | 0:150ac7021bae | 2 | |
physicraftls | 0:150ac7021bae | 3 | Serial pc(USBTX, USBRX); |
physicraftls | 0:150ac7021bae | 4 | //Serial pc(D2,D3); |
physicraftls | 0:150ac7021bae | 5 | DigitalOut d(LED_GREEN); |
physicraftls | 0:150ac7021bae | 6 | |
physicraftls | 0:150ac7021bae | 7 | int main() { |
physicraftls | 0:150ac7021bae | 8 | pc.printf("Echoes back to the screen anything you type\r\n"); |
physicraftls | 0:150ac7021bae | 9 | while(1) { |
physicraftls | 0:150ac7021bae | 10 | int i = pc.getc(); |
physicraftls | 0:150ac7021bae | 11 | pc.putc(i);//why doesnt work without + or +0 |
physicraftls | 0:150ac7021bae | 12 | //if (i == 'a') d = false; |
physicraftls | 0:150ac7021bae | 13 | //else if (i == 's') d = true; |
physicraftls | 0:150ac7021bae | 14 | //pc.putc('\n'); |
physicraftls | 0:150ac7021bae | 15 | pc.printf("\r\n"); |
physicraftls | 0:150ac7021bae | 16 | //pc.printf("aaaaa %d \n",i); |
physicraftls | 0:150ac7021bae | 17 | //wait(1.0f); |
physicraftls | 0:150ac7021bae | 18 | } |
physicraftls | 0:150ac7021bae | 19 | } |