AL DENTE

aka how to handle tasks like a chef with a Raspberry Pi

Pamela Assogba
wearecolorcoded
4 min readJul 20, 2017

--

Al Dente

For the first edition of CC’s Hack Corner, Eunice Lee and I got together on a Sunday to build her brilliant idea: Al Dente, a Raspberry Pi application that prints tasks like orders in a chef’s kitchen. The best part? Once you’re done, you get to spike it just like in the kitchen. Trust me, it feels good.

What’s a Raspberry Pi? Put simply, it is a tiny computer. Not pie. A quick way to see it work is by connecting it to a monitor. It’ll act just like your laptop or desktop! Except probably a bit slower. It’s a great tool to expose yourself to hardware and learn about building gadgets.

Battle of the Pi(e)s

Check out the code on GitHub, use it, improve it, test it, and if you’re curious and/or new to this, read how we did it below!

The Recipe

Ingredients:

  • A Raspberry Pi
  • A thermal printer
  • A monitor + HDMI cable
  • A mouse + keyboard
  • A wifi adapter

The Steps

Connect everything

  • Plug the Pi to the monitor, the thermal printer, the keyboard, the mouse, and the wifi adapter. Turn on the monitor and connect to the Internets via wifi.
your screen should look like this
  • Open the terminal.
  • Clone the repo:
  • Get into the app’s directory:
  • The file with all of our app’s functionality is called get.py
    Open it with nano, the pi text editor:

This is what you should see.

Setting up the Trello API

  • Get your Trello API key and add it in get.py:
  • Create a Trello board and a list
our board is public for ~ease~

Getting the list ID

Let’s get our TO DO list’s id and add it to get.py:

  • Install Postman, an application that lets us simulate requests to APIs and get the data we need. In our case, the data is the list id.
  • Grab the board’s id from the board’s url:
    - Our url:https://trello.com/b/HFWfv1sO/aldente
    - The board id:HFWfv1sO
  • In the Postman’sGET field, enter the url below, gotten from the Trello docs:
Your Postman interface should look like this
  • After hitting send on Postman, this is what you should see:
  • In the Postman response, find your list by its name and grab its id.
  • Add the list id to get.py:

Install the scheduler:
In order to keep checking for new Trello cards and print them in real time, you need to periodically run our code. To do that, install this scheduler used like so:

Run the application!

  • Make sure that you’re in the right folder with the pwd command. It should return a path ending with aldente, similar to this:
  • Here are two ways to run the application:
    1- Type python get.py in the terminal and hit enter
    2- Get in the Python shell by entering python then execfile('get.py')
  • Add cards to your Trello board, watch it live print, and stab away!

Et voila!

Let us know how you did!

Join the Color Coded slack community by visiting our site and stay in the loop.

Want to write an article? Send us a note.

--

--

Pamela Assogba
wearecolorcoded

Systems Engineer in love with all things creativity.