Final answer:
The independent variable in the pillbug experiment is the type of substrate.
Step-by-step explanation:
The independent variable in the pillbug experiment is D) Type of substrate. The independent variable is the factor that is purposely changed or manipulated in an experiment to see its effect on the dependent variable. In this case, the type of substrate is being varied to observe how it affects the behavior of the pillbugs.