4 years, 2 months ago.

Nothing happens with HelloWorld_53L0A1

Hi, I imported the HelloWorld_53L0A1 application, the program compiles but nothing appears on the 4-digit display and neitheir on the terminal. What did I do wrong ? Thanks Cécile

Question relating to:

2 Answers

4 years ago.

Hi Cecile,

The original published example (HelloWorld_53L0A1) did not use the LED display, and only used printf() to display range results from the centre sensor.

There is now another example (Display_53L0A1, https://developer.mbed.org/teams/ST/code/Display_53L0A1/) which uses the onboard LED display to display range results from the centre sensor.

Accepted Answer

Thank you, the link is helpful ! Cécile

posted by Cécile Rapoutet 13 Jun 2017
4 years, 1 month ago.

Hi. Performing the same example testing right now and agree with your comments on the 4 digit display as the display does not appear to be coded with this imported sample. The terminal is fine and is working if you configure Teraterm or equivalent to use the ST virtual COM port -> 9600 bps, N, 8, 1 and then you will see the streamed out data.

Here is the code we just tested:

#include "mbed.h"
#include "x_nucleo_53l0a1.h"
#include <stdio.h>

/* This VL53L0X Expansion board test application performs a range measurement in polling mode
   on the onboard embedded top sensor. */

#define VL53L0_I2C_SDA   D14 
#define VL53L0_I2C_SCL   D15 

static X_NUCLEO_53L0A1 *board=NULL;

/*=================================== Main ==================================
int main()
   int status;
   uint32_t distance;

   DevI2C *device_i2c =new DevI2C(VL53L0_I2C_SDA, VL53L0_I2C_SCL);     
   /* creates the 53L0A1 expansion board singleton obj */
   board=X_NUCLEO_53L0A1::Instance(device_i2c, A2, D8, D2);

   /* init the 53L0A1 expansion board with default values */
   if(status) { printf("Failed to init board!\n\r"); return 0; }

       status = board->sensor_centre->GetDistance(&distance);
       if (status == VL53L0X_ERROR_NONE)
           printf("Distance : %ld\r\n", distance);


With my hand over the sensor, the output is:


Hi Sanjiv, have you managed to get the display to work? I've tried to use the following commands but couldn't get the display to work.

const char testStr[4]="test";

board->display->DisplayString(testStr); printf("Distance : %ld\n\r", distance);

posted by Zheng Jiao 29 May 2017

Zheng - which display does not work ? Our code testing worked but we used the mbed serial port as output and with Tera Term. The posted code is not for use with the LED display supplied with the shield. To be clear, post more details or your code but include the <<code>> your code <</code>> markers.


To use the 4 DIGIT LED display with this kit, you must download X-CUBE-53L0A1 from here:


see at the bottom of the above webpage -> then use IAR or KEIL to compile the source code projects.

However, there are pre-compiled .BIN and .HEX files for the range and gesture demos inside this download which should work for quick testing.

posted by Sanjiv Bhatia 29 May 2017

Hi Sanjiv, thanks for the reply. Yes, the serial output works OK. I was trying to get the 7seg LEDs to light up. I'm adding one line to the helloworld sample code, but it's not working:

       status = board->sensor_centre->GetDistance(&distance);
       if (status == VL53L0X_ERROR_NONE)
           printf("Distance : %ld\r\n", distance);
posted by Zheng Jiao 29 May 2017