Here is the experiment with the photocell replaced with a phototransistor, the NTE3034A.
Here is the flashlight OFF data from the Arduino IDE serial monitor:
Here is the flashlight ON data:
This phototransistor is actually designed for infrared, so I was pleased that it responded to an ordinary flashlight, and as you can see, it had a more dramatic response than the photocell.
Another thing that I like about it is that according to its data sheet it has a switching speed of 60 microseconds, which means that it can receive signals at over 10K baud. That’s faster than the analog port read time for the Arduino, and more than fast enough for the application I have in mind.