As this article points out, what Ahmed Mohamed actually did was take the components out of a mid-'80s Radio Shack digital clock and repackage them, still interconnected, into a pencil case.
I read reports to the effect that this kid had been getting hassled for a while by other kids, e.g., called a "terrorist" for being Muslim, having a Muslim-sounding name, etc. I think he was acting out in response, showing that he could build a bomb and be a terrorist if he wanted. He was, after all, just a few components away.
This conclusion changes the frame, I realize - it takes Ahmed from "persecuted engineering genius" to "typical bullied kid with a screwdriver and a NASA shirt having a typical bullied kid reaction" and it moves the profiling/Islamophobia from the school personnel to the kids. It also suggests that school personnel might should have intervened well before things got to this stage and IMO, given that they didn't, they needed to have concentrated on de-escalation in hopes that the whole thing wouldn't go viral in the media. Instead, they arrested him, photos got out - as did a narrative that diverges substantially from what appears to have actually happened.
It also makes all the accolades and attention heaped upon Ahmed from the likes of MIT and the White House seem misguided and, dare I say, undeserved. I just hope we all learn the right lessons from what happened and move on.