Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@0:eec6d163f913, 2022-04-17 (annotated)
- Committer:
- osw
- Date:
- Sun Apr 17 14:05:46 2022 +0000
- Revision:
- 0:eec6d163f913
1st commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| osw | 0:eec6d163f913 | 1 | #include "mbed.h"//nucleo |
| osw | 0:eec6d163f913 | 2 | |
| osw | 0:eec6d163f913 | 3 | AnalogIn joyx(A0); |
| osw | 0:eec6d163f913 | 4 | AnalogIn joyy(A1); |
| osw | 0:eec6d163f913 | 5 | Serial pc(USBTX,USBRX); |
| osw | 0:eec6d163f913 | 6 | |
| osw | 0:eec6d163f913 | 7 | int main() { |
| osw | 0:eec6d163f913 | 8 | |
| osw | 0:eec6d163f913 | 9 | int x,y; |
| osw | 0:eec6d163f913 | 10 | |
| osw | 0:eec6d163f913 | 11 | while(1) { |
| osw | 0:eec6d163f913 | 12 | x=joyx*100; |
| osw | 0:eec6d163f913 | 13 | y=joyy*100; |
| osw | 0:eec6d163f913 | 14 | pc.printf("%d,%d\r\n",x,y); |
| osw | 0:eec6d163f913 | 15 | } |
| osw | 0:eec6d163f913 | 16 | } |