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 25:a75d6875cb55, committed 2019-01-22
- Comitter:
- hisyamfs
- Date:
- Tue Jan 22 13:38:47 2019 +0000
- Parent:
- 21:bfb064f77f88
- Child:
- 26:9c7f39e21df4
- Commit message:
- bisa jing
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Jan 21 12:41:08 2019 +0000
+++ b/main.cpp Tue Jan 22 13:38:47 2019 +0000
@@ -15,7 +15,10 @@
TPA81 tpay(PB_3, PB_10, 0xDE);
// Ultrasonik
-SRF05 srf1(PC_13, PA_14); // trigger, echo
+//SRF05 srf1(PC_13, PA_14); // trigger, echo
+//SRF05 srf1(PA_11, PB_12);
+//SRF05 srf1(PB_12, PA_11);
+SRF05 srf1(PB_3, PB_10);
SRF05 srf2(PA_15, PB_7); // trigger, echo
DigitalOut relay(PB_2);
@@ -32,8 +35,8 @@
int main()
{
//tpax.changeaddress(0xDC,0xDE);
- while(sound.read()){}
- pc.printf("Sound Detected\n");
+// while(sound.read()){}
+// pc.printf("Sound Detected\n");
while(1) {
pc.printf("%d", tpay.getTemp(0));
int i;