Class Attendance Bot


The project was to create a device that would replace the need to go to class. The final project was a non-autonomous tool that could be controlled by someone not present in the class.

A webcam on the device provides one way communication with a remote device to provide the ability to see and hear what the teacher is talking about and displaying at the front of class. A smartphone app provides remote clicker functionality, giving the user the ability to answer questions from outside of class. A speaker is also attached which provides the ability to declare its presence on command from the smartphone app, to appear as if something is present when their name is called in roll call.

Team Members

  • Jung Hun Kim
  • Jonathan Jones
  • Brandon Smith
  • Scott St. Martin


To provide stable network communications (for Skype and controlling the mbed actions with a smartphone) a portable x86 box is required to connect to the mbed device. The remote user communicates with a server which the x86 box is constantly listening for change on. Any requests are then sent via serial communications from the x86 box to the mbed device. The x86 box also provides a platform for Skype since the mbed device can't run Skype.

In order to remotely control the clicker with the mbed, it was necessary to tear apart the clicker in order to probe the buttons on the device. A mechanical relay bank was used to accurately power the clicker without the need of an external power supply, thus minimizing the amount of another power supply.

Depending on the clicker interfacing with the mbed, a different wiring setup may be necessary and changes to the code may be needed to make sure everything works correctly.

Video Demo

Components Used

  • mbed LPC1768
  • x86 computer
  • Smartphone
  • USB Webcam
  • Hacked Clicker
  • Mechanical Relay Bank (for clicker)
  • mbed Speaker


Note that wiring will vary greatly depending on which clicker you use.

This should just be used as lose guidelines to get you started.

mbedClickerSpeakerx86 BoxWeb Cam
USB SerialUSB Port
USB PortUSB Connection
  • This was used to monitor the voltage levels of the clicker


/media/uploads/sjsm3/20141208_161038.jpg /media/uploads/sjsm3/20141208_161044.jpg /media/uploads/sjsm3/20141208_161115.jpg

Snippets of Code


example of clicker code

                // if clicker's voltage level has changed significantly...
                if ( abs(pwr_level_new - pwr_level) > 20000)
                    // settling time
                    while ( abs(pwr_level_new - pwr_status.read_u16()) > 32 )
                        // wait until the analog input settles to a steady state reading
                        pwr_level_new = pwr_status.read_u16();
                    if (pwr_level_new < pwr_level)  // device is shutting down
                        dev_power = OFF;
                    } else if (pwr_level_new > pwr_level)   // device is turning on
                        confirm_on(pwr_status);     // wait for voltage levels to settle to steady value when powering up
                        dev_power = ON;
                      // update the power level reading
                      pwr_level = pwr_level_new;
                      pc.printf("    Device power status updated. New status: %s\r\n", dev_power == ON ? "ON": "OFF");


example of communication with server

            WebClient Client = new WebClient();
            Client.DownloadFile("", "commands.txt");
            string[] commandsInit = File.ReadAllLines("commands.txt");
            string oldLastCommand = commandsInit[commandsInit.Length - 1];

            while (true)
                Client.DownloadFile("", "commands.txt");
                string[] commands = File.ReadAllLines("commands.txt");
                string newLastCommand = commands[commands.Length - 1];

                if(newLastCommand == oldLastCommand){

                    oldLastCommand = newLastCommand;
                    string[] splitCommand = newLastCommand.Split(',');

                    Console.WriteLine("\n========================= {0}", DateTime.Now.ToString("hh:mm:ss tt"));

                        string message = _serialPort.ReadLine();
                    } catch (System.TimeoutException e) {
                        Console.WriteLine("    mbed did not respond ({0}).", e.Message);


mbed code:

Import libraryAttendance Bot 5000

Hacking into the iClicker2 for adding remote access abilities.

Note: we used the "Speaker.h" file found from this page:

x86 code:

Please log in to post comments.