The pillbox has a sensor that senses its orientation.
It only detects if there are pills in the compartments when the pillbox is facing flat surface with the compartments facing up. The sensors only measure when the pillbox is moved or rotated. Therefore, when you take your medicine, make sure that you open the upcoming compartment that is blinking, empty your medicines by turning the pill box over and then return it to a flat position.
The pillbox also needs to be flat to be able to connect to the app when it has just started charging after running out of battery.