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.
Revision 5:cea6da0fe2f0, committed 2014-12-10
- Comitter:
- mbedalvaro
- Date:
- Wed Dec 10 08:55:56 2014 +0000
- Parent:
- 4:1428775752f7
- Commit message:
- working (the points are not drawn in an interrupt). This is a very simple code communicating wiht the PC through Serial port. Note: I noticed lots of aberrations produced by the filters and amplification in the electronic mirror driver.
Changed in this revision
--- a/laserProjectorHardware/laserProjectorHardware.cpp Wed Dec 10 07:22:41 2014 +0000
+++ b/laserProjectorHardware/laserProjectorHardware.cpp Wed Dec 10 08:55:56 2014 +0000
@@ -116,9 +116,10 @@
float alpha=2*3.141592/numPoints;
float theta=0;
for (int i=0; i<numPoints; i++) {
- writeOutX(X+1.0*R*cos(theta));
- writeOutY(Y+1.0*R*sin(theta));
+ writeOutX(int(1.0*X+1.0*R*cos(theta)));
+ writeOutY(int(1.0*Y+1.0*R*sin(theta)));
theta+=alpha;
+ wait_us(10);
}
}
--- a/main.cpp Wed Dec 10 07:22:41 2014 +0000
+++ b/main.cpp Wed Dec 10 08:55:56 2014 +0000
@@ -102,7 +102,7 @@
else if (val=='C') {
stringData[indexStringData] = 0 ;
if(atoi(stringData)>0) {
- IO.drawCircle(2048, 2048, 1500, 1000, int(atoi(stringData)));
+ IO.drawCircle(2048, 2048, 1200, 2000, int(atoi(stringData)));
}
indexStringData=0;
}