Bicycle brake light with G-sensor