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: X_NUCLEO_53L1A2
Diff: main.cpp
- Revision:
- 1:52cac9f5ed6a
- Parent:
- 0:d8fe7004e61a
- Child:
- 2:7d8d349f52ce
--- a/main.cpp Sun Nov 08 15:59:44 2020 +0000
+++ b/main.cpp Mon Nov 09 17:30:13 2020 +0000
@@ -13,7 +13,7 @@
#include <stdio.h>
#include "mbed.h"
-#include "XNucleo53L1A1.h"
+#include "XNucleo53L1A2.h"
#include "ToF_I2C.h"
#include <time.h>
@@ -25,6 +25,7 @@
#define NUM_SENSORS 3
+// define interrupt pins
PinName CentreIntPin = A2;
// the satellite pins depend on solder blobs on the back of the shield.
// they may not exist or may be one of two sets.
@@ -36,7 +37,7 @@
//PinName RightIntPin = D2;
-static XNucleo53L1A1 *board=NULL;
+static XNucleo53L1A2 *board=NULL;
// MBed V6.4 has renamed wait_ms and UnbufferedSerial replaces Serial
#if (MBED_VERSION > 60300)
@@ -58,7 +59,7 @@
int main()
{
int status;
- VL53L1X * Sensor;
+ VL53L1 * Sensor;
uint16_t wordData;
uint8_t ToFSensor = 1; // 0=Left, 1=Center(default), 2=Right
static VL53L1_RangingMeasurementData_t RangingData;
@@ -74,8 +75,8 @@
dev_I2C->frequency(400000); //also needs doing in spi_interface.c
- /* creates the 53L1A1 expansion board singleton obj */
- board = XNucleo53L1A1::instance(dev_I2C, CentreIntPin, LeftIntPin, RightIntPin);
+ /* creates the 53L1A2 expansion board singleton obj */
+ board = XNucleo53L1A2::instance(dev_I2C, CentreIntPin, LeftIntPin, RightIntPin);
printf("board created!\r\n");
/* init the 53L1A1 expansion board with default values */