Any speaker or lecturer is familiar with a modern phenomenon. A large fraction of your audience is using their tablet, phone or laptop doing email or surfing the web rather than paying attention to you. Some of them are taking notes, but it’s a minority. And it seems we’re not going to stop this, even speakers do it when attending the talks of others.
However, while we have open wireless networks (which we shouldn’t) there is a trick that could be useful. Build a tool that sniffs the wireless net and calculates what fraction of the computers are doing something that suggests distraction — or doing anything on the internet at all.
While you could get creepy here and do internal packet inspection to see precisely what people are doing (for example, are they searching wikipedia for something you just talked about?) you don’t need to go that far. The simple fact that more people in the room are doing stuff on the internet, or doing heavy stuff on the internet is a clue. You can also tell when people are doing a few core functions, like web surfing vs. SMTP vs. streaming based on the port numbers they are going to. You can also tell if they are doing a common web-mail with the IP address. All of this works even if they are encrypting all their traffic like they should be (to stop prying tools like this!)
Only if they have set up a VPN (which they also should) will you be unable to learn things like ports and IP addresses, but again, it’s a nice indicator to know just what total traffic is, and how many different machines it’s coming from, and that will almost never be hidden.
When the display tells you that most of your audience is using the internet, you could pause and ask for questions or find out why they are surfing. The simple act of asking when distraction gets high will reduce it, and make people embarrassed to have done so. Of course, a sneaky program that learns the MACs of various students could result in the professor asking, “What’s so fascinating on the internet, Mr. Wilson?” At the very least it would encourage the people in the audience to use more encryption. But you don’t have to get that precise. The broad traffic patterns are plenty of information.