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 ADS1115 StepperMotor SRF05 TPA81new
Revision 41:71c6f608fd2b, committed 2019-02-11
- Comitter:
- hisyamfs
- Date:
- Mon Feb 11 12:38:54 2019 +0000
- Parent:
- 40:1c29f33d54d7
- Child:
- 42:3b682b7d0388
- Commit message:
- last
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Feb 07 12:46:39 2019 +0000
+++ b/main.cpp Mon Feb 11 12:38:54 2019 +0000
@@ -2,7 +2,7 @@
#include "TPA81new.h"
#include "SRF05.h"
#include "Uvtron.h"
-
+#include "Stepper.h"
#define LCD_D4_DIG PA_15
#define LCD_D5_DIG PA_14
#define LCD_E_DIG PC_15
@@ -55,7 +55,7 @@
// stepper(PinName _en, PinName ms1, PinName ms2, PinName ms3, PinName _stepPin, PinName dir);
stepper s(PC_6, PC_8, PA_12, PC_7, PA_11, PB_12);
-DigitalOut led_api(PH_0);
+DigitalOut led_api(PC_14);
DigitalOut led_sound(PH_1);
float call_depan(uint16_t x){
@@ -66,6 +66,7 @@
int main()
{
//tpax.changeaddress(0xDC,0xDE);
+ relay = 1;
// while(sound.read()){}
led_api = 0;
led_sound = 0;
@@ -94,10 +95,10 @@
else pc.printf("NOT DETECTED\n");
wait(0.5); // 200 ms
- relay = 1;
+ relay = 0;
pc.printf("RELAY ON\n");
wait(0.5);
- relay = 0;
+ relay = 1;
pc.printf("RELAY OFF\n");
pc.printf("Line = %.2f\n", 3300*line.read());