@@ -14,7 +14,7 @@ void VL6180XInit()
1414{
1515 VL6180x sensor (VL6180X_ADDRESS);
1616 Wire.begin (); // Start I2C library
17- delay (1500 ); // delay 1.5s
17+ delay (1500 ); // delay 1.5s
1818
1919 sensor.getIdentification (&identification); // Retrieve manufacture info from device memory
2020 printVL6180xIdentification (&identification); // Helper function to print all the Module information
@@ -29,34 +29,31 @@ void VL6180XInit()
2929 delay (1000 ); // delay 1s
3030}
3131
32- void printVL6180xIdentification (struct VL6180xIdentification *temp )
32+ void printVL6180xIdentification (struct VL6180xIdentification *dev )
3333{
34+ Serial.println ();
3435 Serial.println (" VL6180X sensor" );
3536
3637 Serial.print (" Model ID = " );
37- Serial.println (temp ->idModel );
38+ Serial.println (dev ->idModel );
3839
3940 Serial.print (" Model Rev = " );
40- Serial.print (temp ->idModelRevMajor );
41+ Serial.print (dev ->idModelRevMajor );
4142
42- Serial.println (temp ->idModelRevMinor );
43+ Serial.println (dev ->idModelRevMinor );
4344
4445 Serial.print (" Module Rev = " );
45- Serial.print (temp ->idModuleRevMajor );
46+ Serial.print (dev ->idModuleRevMajor );
4647
47- Serial.println (temp ->idModuleRevMinor );
48+ Serial.println (dev ->idModuleRevMinor );
4849
4950 Serial.print (" Manufacture Date = " );
50- Serial.print ((temp ->idDate >> 3 ) & 0x001F );
51+ Serial.print ((dev ->idDate >> 3 ) & 0x001F );
5152 Serial.print (" /" );
52- Serial.print ((temp ->idDate >> 8 ) & 0x000F );
53+ Serial.print ((dev ->idDate >> 8 ) & 0x000F );
5354 Serial.print (" /1" );
54- Serial.print ((temp ->idDate >> 12 ) & 0x000F );
55+ Serial.print ((dev ->idDate >> 12 ) & 0x000F );
5556 Serial.print (" Phase: " );
56- Serial.println (temp->idDate & 0x0007 );
57-
58- Serial.print (" Manufacture Time (s)= " );
59- Serial.println (temp->idTime * 2 );
57+ Serial.println (dev->idDate & 0x0007 );
6058 Serial.println ();
61- // Serial.println();
6259}
0 commit comments