How can I be sure that the screen is flashing at 40Hz, is there a way to verify that?
To verify 40Hz light stimulation you need to slow down the light flickering. You can use slow motion video recording feature of a smartphone. For example, iPhone Slo-Mo mode reduces speed 8-fold. You could use an iPhone Slo-Mo to record flickering of the iPad and then use the iPad Slo-Mo to record the iPhone’s video playback. By making Slo-Mo video of a Slo-Mo video you will slow the frames down 64 times.
Then just count the black frames. The original 40Hz stimulation was slowed down 64 times. Therefore, there should be 40 black frames in 64 seconds.