Mini-Rambo Marlin firmware changes for the BigTreeTech filament sensor

I just bought a BigTreeTech filament sensor for my MP3DP, which has one of Ryan’s Mini-Rambo boards. Hopefully this is do-able. I had already had a bit of a disaster with tangled filament. Has anyone already figured out what firmware changes are necessary to integrate it into a build? Could you please share them? Thank you.