Hack Raspberry Pi to tell you a joke

This is a hacking robot recipe — it takes 30 minutes tops, really just beginner programing/cloud skills and about $50 in ingredients (Raspberry Pi 3) — plus cardboard.

Recently my 11yo son got obsessed with one of the personal assistants available on the market. He made me (thru Santa Clause, Easter Bunny, or Tooth Fairy — yeah, good for him — he still believes in them — just till the middle school, eh!!!) to buy him one of the popular ones out there.

Now I want to get those download the ghost abilities of creators of Scarlet Johanson’s role of Major in exciting Ghost in the Shell

Scarlett Johanson as Major in Ghost in the Shell

Unfortunately I failed to convince him, that I am going to help him building his own personal assistant from scratch with Raspberry Pi, IBM Watson and TJBot cardboard robot that is connected to the cloud. He knew better than that!

To my luck fortunetly my 8yo daughter felt into my TJBot trap, and I even made her an example of the first Proof of Technology.

Back in 2014 I was talking to VP of Engineering from Jibo, on their challenges with building, marketing, and delivering a Jibo robot over that so successful Indigogo crowdfunding campaign. Have you seen this campaign? That was one of the sexiest socially enabled robot assistants of the time. Today anyone can build it — more less — in matter of days, if not hours — based on the existing cloud resources of AI, various SaaS based systems. I will show you how to do a small robot — an early prototype of Jibo robot just with cardboard, Raspberry Pi and its connection to the cloud based AI. Check the Jibo crowdfunding video — https://www.indiegogo.com/projects/jibo-the-world-s-first-social-robot-for-the-home#/

Back in 2014 I was so inspired by the sheer success of the Jibo Indiegogo campaign — $3,663,105

For Jibo, due to the long cycle from the crowdfunding to delivery (more than 2 years!!!) it lost its cutting edge — and now the Jibo might be wishing to be acquired. Regretfully I know the same pain from my startup of missing the window of opportunity — here are some outdated features that could make it become the hit again: https://youtu.be/U1RASlbIIVc

One would say that this might have been the best animated personal assistant, that you could relate to as an object with personality. It missed its mark, but there is the hope. Because the robot ghost 👻 could be in a cloud ☁️ so it could be easily downloaded into your robot shell.

Let the hack begin

So without further due let’s start. To do your personal assistant you need the following ingredients:

setting up raspberry pi

Raspberry Pi 3 is one of the latest IoT type computers out there. It is very simple to setup. After buying it thru the online store — the bare board is about $35 (you need to have a memory card, a USB microphone, and attach it to a small/any speaker). Just follow this link to boot it, and set it up (the Youtube video with the recipe is coming soon…). Do not forget to get your keyboard, and mouse with a monitor (attached via HDMI) to do an initial setup. Later you might just to SSH to the board.

setting up IBM Cloud

http://ibm.biz/get-ibm-cloud-lite

You need IBM Cloud ⛅️ account — the free lite account would do — for Speech to Text, Text to Speech and the chatbot Assistant AI services . All these services are provided by IBM Watson. After logging in go to catalog, and provision — otherwise create — the following services:

Importing the workspace file with preset dialog just by clicking here.
Find workspace-sample.json from the cloned tjbot github.

Now you can try the dialog out as it is shown on the next screen:

IBM Watson Assistant business tool for dialog, intents, and entities development.

When you come back to the Watson Assistant dashboard simply click 3 dot mini hamburger to get the details of the workspace as it is shown on the below picture:

View details would expose the Workspace ID that you would need in the next step.

connecting the dots . . .

Now you are ready to connect TJBot node.js library with the IBM Watson services. You need to copy the credentials from the above mentioned 3 services, and the workspace id from the Watson Assistant in the config.js file:

$ nano config.js

You will see the following fields to be filled with the above mentioned information:

exports.conversationWorkspaceId = ‘’;
exports.credentials = {};
exports.credentials.conversation = {
password: ‘’,
username: ‘’
};
exports.credentials.speech_to_text = {
password: ‘’,
username: ‘’
};
exports.credentials.text_to_speech = {
password: ‘’,
username: ‘’
};

In the configuration.js file (use again the nano editor, or other) you can configure the “attention” word — for example “computer” (like the other systems are having: Jibo, Hi Google, Alexa, or Hey Siri). And the voice type (male, or female). Then you can run the program and test the conversation with the TJBot with the following command:

$ sudo node conversation.js

Folding cardboard of TJBot robot

And now there is the final step to use the cardboard to fold it into the TJBot robot 🤖 , and insert into it your Raspberry Pi. The details on how to do it you can find it here: https://www.research.ibm.com/tjbot/

TJBot robot is a wrapped Raspberry Pi in laser cut cardboard with a microphone, a speaker, a servo, and a camera — all powered with IBM Watson services.

et voila!

Where to go from here?

Hundreds of the chatbot workspace projects ready to re-use in your project.

I hope you find this hack entertaining and adventorous. Feel free to follow me on twitter.

I am a technology advocate for autonomous robots, AI, mobile and Internet of Things - with a view from both the enterprise and a robotics startup founder.