Need help so bad <3

I am new with you and seeking help for my project:)

I want to to build a circuit with your help and proragram it.

I have sensor ADXL345 Arduino:)

Example:

İf this box in a car:

when car stoping, relay is on (light is on)
when car moves, relay off
when car brakes, relay is on

This is my first topic guys excuse me if I am doinfg somthing wrong. And Iam beginner about program language of Arduino Thank you.

The ADXL345 is very popular, so search the web for "arduino adxl345" for lots of project descriptions and simple code examples.