Giving people a voice through Javascript Robotics for the 2016 US Presidential Election

2 Contributions Made
1 Milestones
9 Participating Countries

TrumpBot & HillaryBot for the 2016 US Election, powered by Javascript Robotics, giving people a chance to interact with the "candidates"


Project Overview:

We love javascript, robotics, and we’re huge fans of how much potential for comedy there is around the 2016 US presidential election.

This project will also be leveraged in the future to make fun of any celebrity.

We’re makers at heart, so we decided to make a web app and actual robots to poke fun at Donald Trump & Hillary Clinton (if we have time). This isn’t all just for laughs, at the end of the day, we’re hoping this acts as a reminder for people to get out there and VOTE!

A big thank you to all of you who contributed great ideas and helped us get to this current iteration of the project concept

This project represents no preference of political candidate. It just so happens Trump looks funnier than Hillary.


Where we’re at:

Picked out Tone.js for an audio interface (still have to implement in React)

Successfully implemented face-tracking Open-CV based algorithm with a face detection machine learning based classifier in React. (made it so other classifiers could easily be plugged in to detect other things besides faces, like colors, shapes, etc…)

Implemented some math for ratios being used as an interface between face-tracking coordinates stream and parts of the virtual head.

Implemented canvas render of the video with a hit box to follow a users face under the virtual head (to help tweak ratios while in development)

Finishing up implementing a direct connection with Johnny Five and Socket.io for real time data stream to the hardware.


Where we’re going:

Main issues to tackle are currently figuring out audio, finding clips, finding tools, illustrations / concept art / inspiration illustration images, web interface.

Please see next section for task details

Please reply to tasks to let me know what you want to work on. I’m making a Road Map with short task summaries and assigning people there so we have a permanent place to organize.

Technology Pillars: Web App / Robots:


Implementing a Open CV based solution with addition of machine learning classifiers into a React.js web application. The candidates faces would move / change based on the face data. I’ve managed to hack this prototype together of an orange “Trump” head, with eyes following the user around and neck turning using 3D transforms for the “neck turning”

You can find the GitHub repository here:



( or simpler abstraction over the api )

Using the face tracking data stream, depending on where a person is in the frame while looking at the camera, Trump/Hillary will scream out different bits of hilarious audio.



( Javascript Robotics )

The final step of the project is to create some type of moving robot with the web app. Some ideas are either:

  1. A mask over a lightweight frame for the head on a servo, the servo would rotate based head tracking data streaming from camera. This would be mounted on a remote controlled base with wheels/motors so Election Bots can chase people in the streets
  2. LCD touchscreen with the web app on it, a really funny big trump wig on top of it, so the screen would be all orange face. Same thing as option 1 with remote controlled wheels/motors combo.

Teammates & Contributors I’m Looking For

=> #javascript
=> #research
=> #robotics
=> #mechanicalDesign
=> #automation
=> #ai
=> -finding options for API’s
=> -finding sound clips
=> -finding tools
=> #web-development
=> #user-interface-design
=> #api-development
=> #react / #react-native

Tech Stack

#react.js (declarative & functional style user interface building)
#webrtc (browser & android camera access)
#node.js (backend server / data streaming to hardware)
#socket.io (real time data to hardware)
#johnny-five (Javascript to Firmata protocol bridge for Arduino / Pi)



This is outside the scope that’s possible before the election, however ping me if anyone is interested a project based on flying drones and helium balloons , as a possible side project.

Here’s a very basic concept, just a a piece of paper that I drew Trump on to get a feel for the bots flying, but imagine large baloons of the candidates heads in the distance, most of the time not needing battery and staying airborne for up to an hour+


Complete Tasks:

Picked out Tone.js as the audio interface


Launch app on server publicly / codebase refactor, instructions in README for the repo

  1. Need to get a basic version of the current app running on the server for the public to attract other designers and developers.
  2. There’s a lot of moving parts so need to make it a bit more clear how the code works, will be refactoring a bit and adding more code comments
    => assigning this to myself (Anton)

Figuring out what trump says, this will be based on:

  1. Where a user’s face is in relation to the camera, example:(if a user face get’s far away, Trump says something like “I knew you couldn’t handle it, not everyone can handle the Trump”, if a user’s face is far away, Trump says something about coming closer), etc…

  2. Figure out what Trump can say based on props, so let’s say there is a boombox next to Trump’s, if a user clicks on the boom box, let’s say it starts playing a Mexican or French song for example, we can make Donald Trump’s head start going from orange to red slowly until it’s really red and his tiny hands smash the boom box turning the song off.

  3. General sound bytes, best of the best of what we can find that would suit Trump randomly shouting something.



Figure out the best way to capture sound from YouTube

Need people to do some research on some free tools others could use to capture sound clips from YouTube videos. There is a gold mine of amazing clips on You Tube. Preferably some kind of chrome extension/webapp if possible, and something that let’s you trim the audio before saving it.


Find online Donald Trump sound boards

Need people to search for Donald Trump sound boards online. It would be nice if the sound board had an option to download, if not we can inspect the source in chrome developer tools to see if the source is available. Even if the download option isn’t available, if you find a funny sound board, please post it.


Need drawings / Illustrations / Concept Art

Need illustrations ultimate in vector format If someone has a good idea, they can sketch it out in any format they want, I can fairly quickly redraw it in #Illustrator. The head needs to be split up into multiple parts (hair/eyes/eye brows/nose/mouth/chin, etc…), each will move based on face tracking, also each being separate let’s us position the elements of the face for different expressions


Discuss Election-Bots

Start a discussion...
Start typing..