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 11:bd2dee9957a9, committed 2016-04-15
- Comitter:
- TNU
- Date:
- Fri Apr 15 14:07:49 2016 +0000
- Parent:
- 9:067f75510d67
- Child:
- 12:d1767e2bd3a8
- Commit message:
- Fixed resetpin
Changed in this revision
| LidarSpi.cpp | Show annotated file Show diff for this revision Revisions of this file |
| LidarSpi.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/LidarSpi.cpp Fri Apr 15 13:53:31 2016 +0000
+++ b/LidarSpi.cpp Fri Apr 15 14:07:49 2016 +0000
@@ -20,6 +20,10 @@
// -> Cant't send anything to lidar without changing lidar SPI mode
device.format(8,1); //8 bit, CLPOL=1, CLPHA=1
device.frequency(16000000);
+ resetPin.write(0);
+ wait_us(100);
+ resetPin.write(1);
+
}
--- a/LidarSpi.h Fri Apr 15 13:53:31 2016 +0000
+++ b/LidarSpi.h Fri Apr 15 14:07:49 2016 +0000
@@ -192,7 +192,7 @@
SPI device;
DigitalOut chipS;
DigitalIn dataReady;
- DigitalIn resetPin;
+ DigitalOut resetPin;
DigitalOut trigger;
DigitalIn sampling;