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.
Dependencies: mbed Adafruit_GFX DS1820
Diff: main.cpp
- Revision:
- 4:c691dac74f1b
- Parent:
- 3:b05574b98b47
- Child:
- 5:757013f46517
--- a/main.cpp Thu Dec 16 16:44:58 2021 +0000
+++ b/main.cpp Fri Dec 17 15:58:11 2021 +0000
@@ -38,6 +38,7 @@
DigitalOut led(LED1);
DigitalOut myLed1 (D4); //Indicador programa Taladro seleccionado
DigitalOut myLed2 (D6); //Indicador programa Transportador de Piezas seleccionado
+PwmOut dirBMotor(A3); //Motor DC
DS1820 ds1820(D10); //Substitute PA_9 with actual mbed pin name connected to the DS1820 data pin
@@ -104,7 +105,7 @@
gOled.printf("Programa Taladro");
gOled.display();
gOled.setTextCursor(0,0);
-
+ //dirBMotor=0.5;
}
@@ -169,6 +170,7 @@
else if ((contador>0) && (tiempo.read() > 0.6)){
contador++;
+
estado=abierta;
enable=0;
@@ -236,7 +238,8 @@
estado = cerrada;
enable = 0;
contador=0;
- FUNCIONAR=0;
+ FUNCIONAR=0;
+ //dirBMotor=0.0;
}
@@ -313,6 +316,7 @@
{
pc.baud(115200);
estado=cerrada;
+ dirBMotor=0.4;
gOled.begin();
gOled.clearDisplay();
gOled.printf("Hola\n");