yasuo hayashibara
/
robocon_ad_check
This is a check program for the Robocon Magazine.
main.cpp@0:0dbea050804e, 2013-01-16 (annotated)
- Committer:
- yasuohayashibara
- Date:
- Wed Jan 16 16:00:07 2013 +0000
- Revision:
- 0:0dbea050804e
This is a check program for Robocon Magazine.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yasuohayashibara | 0:0dbea050804e | 1 | #include "mbed.h" |
yasuohayashibara | 0:0dbea050804e | 2 | |
yasuohayashibara | 0:0dbea050804e | 3 | AnalogIn adc_in1(p15); |
yasuohayashibara | 0:0dbea050804e | 4 | AnalogIn adc_in2(p16); |
yasuohayashibara | 0:0dbea050804e | 5 | Serial pc(USBTX, USBRX); |
yasuohayashibara | 0:0dbea050804e | 6 | |
yasuohayashibara | 0:0dbea050804e | 7 | int main() { |
yasuohayashibara | 0:0dbea050804e | 8 | while(1) { |
yasuohayashibara | 0:0dbea050804e | 9 | pc.printf("%f, %f\r\n",adc_in1.read(),adc_in2.read()); |
yasuohayashibara | 0:0dbea050804e | 10 | wait(2); |
yasuohayashibara | 0:0dbea050804e | 11 | } |
yasuohayashibara | 0:0dbea050804e | 12 | } |