Train TJBot to Measure CPU Temperature in Node-RED

JeanCarl Bisson
3 min readAug 27, 2017

--

At the Watson meetup this week in Foster City, I gave a presentation about what the TJBot is, how the community has evolved around this adorable cardboard box, and how it has encouraged people to jump into IoT and hardware. I did a live coding segment where I encouraged the group to help me train TJBot to do something. Well, let’s just say that doing anything with a committee of people can be challenging. But it worked out. This is what we came up with in about ten minutes, and I dedicate today’s training to those who joined me to train TJBot to measure it’s own temperature.

Today we’ll train TJBot how to measure the CPU temperature and speak it out using the Watson Text to Speech service and the speaker node.

The exec node retrieves the CPU temperature.

A switch node checks if the temperature is above 44 degrees Celsius.

Two template nodes construct the messages to be spoken.

This project uses the speaker. Configure the TJBot as shown and add the Watson Text to Speech service credentials.

Remember to set the Speaker Device ID to the card and device number of your speaker. Run the command aplay -l to locate this if you have a USB audio adapter or USB speaker connected.

Here’s a video of how to train TJBot to speak the CPU temperature.

That’s it for today’s skill. What can you train TJBot to do now that it can measure the CPU temperature?

Come back tomorrow and we’ll train TJBot to speak the weather conditions using the Weather Company Data.

This post is part of a series of skills you can train TJBot to perform.

--

--

JeanCarl Bisson

I’m an IBM Technical Innovation Lead. I love to build prototypes and then share how I designed and built what I made so others can try it too.