markniu / Bed_Distance_sensor

Auto bed level with High resolution distance sensor
281 stars 28 forks source link

Can't get collision sensing to work #105

Closed Obamium69 closed 8 months ago

Obamium69 commented 8 months ago

First of all, I would like to say that the BD-sensor is a fantastic product. I tried enabling collision sensing but I can't seem to get it working. Even when I set collision_homing:1 and collision_calibrate:1 it doesn't calibrate is automatically and I have to manually calibrate it (as described here https://github.com/markniu/Bed_Distance_sensor/wiki/Installing-for-Klipper 5. Calibration).

Printer: Voxelab Aquila X2 (Ender 3 v2 clone) klipper version: v0.12.0-117-g71604b71 moonraker version: v0.8.0-320-g6b1b8c51 M102 S-1 output: BDsensorVer:V1.2 pandapi3d.com ,switch_mode=0,collision_homing=1,collision_cal=1

BD-sensor config:

[BDsensor] 
scl_pin:PB0
sda_pin:^PB1
delay: 20
z_offset:0
z_adjust:0.0
x_offset: -45
y_offset: -7
position_endstop: 0.8 
no_stop_probe:
collision_homing:1
collision_calibrate:1

Do I need to reflash the mcu or am I missing something else?

markniu commented 8 months ago

yes, need to relfash the mcu. the returned message should be contained V1.2c and switch_mode=1 V1.2c pandapi3d.com ,switch_mode=1,collision_homing=1,collision_cal=1 the stock bdsensor from pandapi3d.com in the recent month has been updated to the latest v1.2c,others from mellow will be update later.

Obamium69 commented 8 months ago

This means I can flash the firmware https://github.com/markniu/Bed_Distance_sensor/blob/new/hex/V1.3_STM32/V1.2stm32_20240211.hex. Is this correct or am I misunderstanding something?

markniu commented 8 months ago

right, https://github.com/markniu/Bed_Distance_sensor/wiki/Flash-BDsensor(stm32)-firmware

This means I can flash the firmware https://github.com/markniu/Bed_Distance_sensor/blob/new/hex/V1.3_STM32/V1.2stm32_20240211.hex. Is this correct or am I misunderstanding something?

Obamium69 commented 8 months ago

It seems to be working now. Thanks :)