Boss lady
Boss lady
DIIDevHeads IoT Integration Server
Created by Boss lady on 8/12/2024 in #firmware-and-baremetal
Verifying I2C Communication on BeagleBone Black for VL53L0X and OLED Display
Hello Guys, based on my project parking assistance system using a BeagleBone Black running Embedded Linux, VL53L0X time-of-flight distance sensor to detect the distance to nearby objects and a 0.96-inch OLED display to show the distance and warning messages, how do I properly verify that the BeagleBone Black can communicate with the VL53L0X sensor and OLED display? here is what i have tried and the error i encountered in the process Error: I2C bus error
import board
import busio
import adafruit_vl53l0x
from Adafruit_SSD1306 import SSD1306_128_64

i2c = busio.I2C(board.SCL, board.SDA)
vl53 = adafruit_vl53l0x.VL53L0X(i2c)
disp = SSD1306_128_64(rst=None)
disp.begin()
disp.clear()
disp.display()
distance = vl53.range
print(f"Distance: {distance} mm")

disp.text(f"Distance: {distance} mm", 0, 0, 1)
disp.display()
import board
import busio
import adafruit_vl53l0x
from Adafruit_SSD1306 import SSD1306_128_64

i2c = busio.I2C(board.SCL, board.SDA)
vl53 = adafruit_vl53l0x.VL53L0X(i2c)
disp = SSD1306_128_64(rst=None)
disp.begin()
disp.clear()
disp.display()
distance = vl53.range
print(f"Distance: {distance} mm")

disp.text(f"Distance: {distance} mm", 0, 0, 1)
disp.display()
2 replies