MPU6050 Sensor

Hello,

I have a RC car and I am trying to measure deceleration using a MPU6050 so that I can output braking lights using LED's. I was also wondering whether or not it would be possible to engineer a solution that would detect reversing also. I have the code to measure Yaw/Pitch/Roll and it successfully measure the different angles and I have used these measurements for a tilt sensor, which buzzes when the car has tilted beyond a certain limit to notify the driver of danger. I am also wanting to implement indicators and my idea to make this work is that if the car's angle is changing, ie. turning right, then I can set off a LED as an indicator. My problem is that I have little coding experience and whilst I am able to pick up the YPR values, though watching tutorials, I am now wanting to code a solution for indicators, brake and reverse lighting.

Many Thanks,
Alyan