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.
Master.cpp@24:8e7cc6a2e214, 2013-11-19 (annotated)
- Committer:
- calamaridudeman
- Date:
- Tue Nov 19 19:12:42 2013 +0000
- Revision:
- 24:8e7cc6a2e214
- Parent:
- 23:112c0be5a7f3
- Child:
- 25:8a34b8d6cc6e
fixed all the java<->cpp confusion
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
calamaridudeman | 23:112c0be5a7f3 | 1 | #include "mbed.h" |
calamaridudeman | 24:8e7cc6a2e214 | 2 | #include "include/zgeom.hpp" |
calamaridudeman | 22:4d85d989af08 | 3 | |
calamaridudeman | 23:112c0be5a7f3 | 4 | Serial pc(USBTX, USBRX); |
calamaridudeman | 23:112c0be5a7f3 | 5 | |
calamaridudeman | 22:4d85d989af08 | 6 | int main() { |
calamaridudeman | 22:4d85d989af08 | 7 | |
calamaridudeman | 23:112c0be5a7f3 | 8 | Point p1(1,2,3); |
calamaridudeman | 23:112c0be5a7f3 | 9 | Point p2(2,2,3); |
calamaridudeman | 23:112c0be5a7f3 | 10 | |
calamaridudeman | 23:112c0be5a7f3 | 11 | Line l1(p1,p2); |
calamaridudeman | 23:112c0be5a7f3 | 12 | |
calamaridudeman | 23:112c0be5a7f3 | 13 | Point p3(3,2,3); |
calamaridudeman | 23:112c0be5a7f3 | 14 | |
calamaridudeman | 23:112c0be5a7f3 | 15 | Point bLine[3] = {p1,p2,p3}; |
calamaridudeman | 23:112c0be5a7f3 | 16 | |
calamaridudeman | 23:112c0be5a7f3 | 17 | BezCurve b(bLine, sizeof(bLine)/sizeof(Point)); |
calamaridudeman | 23:112c0be5a7f3 | 18 | |
calamaridudeman | 23:112c0be5a7f3 | 19 | b.setAdot(.025); |
calamaridudeman | 23:112c0be5a7f3 | 20 | b.startCurve(); |
calamaridudeman | 23:112c0be5a7f3 | 21 | |
calamaridudeman | 23:112c0be5a7f3 | 22 | while(1){ |
calamaridudeman | 23:112c0be5a7f3 | 23 | pc.printf("%f\n",b.newPoint().x); |
calamaridudeman | 23:112c0be5a7f3 | 24 | wait(2); |
calamaridudeman | 23:112c0be5a7f3 | 25 | } |
calamaridudeman | 22:4d85d989af08 | 26 | } |