Police say the boy modified the camera using instructions from the Internet. He brought the device to school but a teacher intervened before he could use it.
School Resource Officer Kyle Strunjo says the makeshift device is potentially capable of giving someone a 600-volt shock.
The boy has been charged with possession of a dangerous weapon on school grounds, attempted assault and breach of peace.