A $150 gadget turned math class into a battleground nobody expected.