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.
Fork of 01-01SolucionFuncionXY by
Diff: main.cpp
- Revision:
- 2:878cb2697ab1
- Parent:
- 1:370d6730c1cf
- Child:
- 3:fe8e265eaf6e
--- a/main.cpp Tue Feb 20 00:39:23 2018 +0000
+++ b/main.cpp Wed Mar 07 00:03:12 2018 +0000
@@ -6,6 +6,18 @@
PwmOut myServoY(PB_4);
+void draw()
+{
+
+ // ubicar el codigo respectivo para mover el eje z y dibujar
+
+}
+void nodraw()
+{
+
+ // ubicar el codigo respectivo para mover el eje z y no dibujar
+
+}
void vertex2d(float x, float y){
@@ -31,14 +43,17 @@
myServoY.period_ms(20);
int posx=0;
int posy=0;
+ draw();
while(1)
{
wait(2);
vertex2d(posx,posy);
posx+=10;
- posy+=10;
- if (posx>50) posx=0;
- if (posy>50) posy=0;
+ if (posx>50){
+ posx=0;
+ nodraw();
+ }
+ posy=posy;
}
}
