Project tutorial
IoT Notes Printer: Your Smartphone Notes on Paper

IoT Notes Printer: Your Smartphone Notes on Paper © GPL3+

The "Zerynth IoT Notes Printer" tries to create a handable medium for everyday communication.

  • 35 respects

Components and supplies

STM32 Nucleo ST Nucleo
Ard due
Arduino Due
Adafruit Thermal Printer
Adafruit CC3000 wifi shield

Necessary tools and machines


Apps and online services

About this project
DISCLAIMER: Viper is now operating under the brand name Zerynth! Some elements (pictures, videos, code, etc..) may still have the old name. For any doubt, please, open a thread on our community forum

The "Zerynth IoT Notes Printer" tries to create a handable medium for everyday communication.

Thanks to the Zerynth App you can write text messages and send them to a small thermal printer programmed with Zerynth Studio and connected to the network via a microcontroller and a wi-fi chip.

Step 1: Why this project?

The techno-stress in the era of IoT

We always eulogize to the virtues and the benefits of the Internet of Things, dreaming of a future in which everything is connected to the network and can interact with us.

However, making a further stretch of the imagination is not difficult to see disaster scenarios, where man is under the yoke of electronic devices and lives forever with a kind of notification anxiety.

The development of the Internet and social networks, in fact, has "forced" to a new way of communicating, perhaps more efficiently than ever before but definitely more stressful.

The "techno-stress", condition due to the excessive and simultaneous information conveyed by electronic devices, is even listed among the new occupational diseases.

The victim of techno-stress undergoes an overload of information and stimuli due to the connection and continuous interaction with computers, tablets, smartphones and now, thanks to IoT, also with everyday objects connected to the network.

Moreover, the notification is a sign that someone or something, somewhere, is considering us. Every time we get a message, a call or an e-mail becomes hard to resist the temptation to see what that is, causing us a state of excitation and anxiety.

So how can we protect us from techno-stress?

Perhaps the method most extreme, but certainly more effective, is the technological fasting. We should "pull the plug", log off.

Step 2: Zerynth IoT Notes Printer

If the technological fasting seems a bit excessive solution you can start with something less radical, re-establishing a contact between the digital and the physical world.

Just imagine how much stress could be avoided if all daily notifications, mostly useless and unnecessary, were gathered together, maybe printed on paper (the gold old paper), and are shown to us only in the evening or when you are on metro.

This would make it possible to take full advantage of "dead time" and not waste precious minutes to the battery life of the smartphone.

And how many times you've had to make a shopping list for a large group of people, perhaps for a dinner with roommates. How would it be easier to write the list on a shared app and then getting the final list on a piece of paper, before you leave home?

Zerynth makes this possible. The "Zerynth IoT Notes Printer" tries to create a handable medium for everyday communication. Thanks to the Zerynth App you can write text messages and send them to a small thermal printer programmed with Zerynth and connected to the network via a microcontroller and a wi-fi chip.


Ok, at this point I should be succeeded in convince you of the utility of the project. If still you ask: "But why should I print a text message sent from a smartphone?", honesty the best answer I can give is: "Because you can, and it's fun to do".

Moreover, through this simple project we can show the potential of Zerynth and of the Zerynth App.

Step 3: Required Material

The project is very simple and requires few elements.

First you need Zerynth Studio (available at

Zerynth is an easy to use development suite for the high level design of interactive objects ready for the cloud and the IoT. With Zerynth creatives, designers and professionals can develop in Python for Arduino DUE, ST Nucleo, Particle Photon and most of the ARM 32bit microcontrollers family, using paradigms and features typical of PC and mobile programming.

In this project we will see also how to use the Zerynth App (, which allows you to control the "virtualized" objects via mobile without having to develop a specific Android app to each project.

Moving on to the hardware side, for this project you need one of the boards among those supported by Zerynth, such as ST Nucleo or Arduino Due.

Obviously you need an element that connects the board to the Internet, such as the wi-fi shield of Adafruit. However you can use any other adapter that mounts the wifichip CC3000 Texas Instruments (ttp:// ).

It will then be necessary a device that can print. A very affordable gadget is theThermal Printer from Adafruit (

Also known as receipt printers, they’re what you see at the ATM or grocery store. This printer is ideal for interfacing with a microcontroller, you simply need a 3.3V to 5V TTL serial output from your microcontroller to print text with any kind of formatting, barcodes, bitmap graphics and even QR code.

You also need:

  • very common 2.25" wide thermal paper
  • 5 Volt to 9 Volt regulated DC power supply that can provide 1.5 Amps
  • 2.1mm jack adapter, which you can attach to the printer’s red/black wires

Finally you need to get a nice container in which to put it all. We chose a nice box painted with the American flag, found in a common gift shop, but you can pick any way you like. The important thing is that it must be large enough to hold the boards and that is not too difficult to drill (note that you have to practice a hole on the top to accommodate the thermal printer!).

Step 4: Assembling the circuit

The RX-TX pins of the printer must be connected to the TX-RX pins of the serial port chosen on the microcontroller. The serial port used in the code (see below) is the "Serial1", located on pins D24 and D25 of Morphos Headers in ST Nucleo and on pins D18 and D19 in the headers of Arduino Due.  

Step 5: "Virtualizing" the printer

Using Zerynth is very easy!

Let's leave out the operations of connecting and "virtualizing" of the board (already explained here and we go to the creation of a new project in Zerynth.

As you can see in the first figure, it takes only two steps:

  • click on the button "Browse Project"
  • click on the "New Project"

Now just fill in the fields with the project title and an optional description. Zerynth also allows you to insert tags. This will make it much easier to filter results when searching through old projects.

After creating the project by clicking on the "Create" button, we will have a blank text editor to copy the code presenting in, the main file on which is written in Zerynth/Python language the logic of the program.

You need to edit SSID_WiFi and PWD_WiFi with the name and password of the WiFi network to which you will connect the printer.

In order to interact with the Zerynth App you need to add another file to the project. It is an HTML file that defines the interface that will have the specific App.

To add a file to the project just click on the "Current Project", then "Add files to project" and finally, after naming the file ("template.html") on the "Create" button, as shown in second figure.

Again we will have a blank field on which to copy the code, which is defined in HTML5 (and through the library jQuery Mobile) the interface of the App.

To get a better idea of the functioning and the philosophy behind the development of interfaces via the Zerynth App refer to examples found at this address:

At this point you have to compile the script and upload it to the board. After turning on the printer, this will automatically connect to the preset network.

Then just open the Zerynth App, which will go in search of "virtualized" objects connected to the network, select the object of interest (in this case, of course, the "Zerynth IoT Printer Notes") and you can interact with the printer!

The code has many comments and should be easy to understand. However, to get a better idea of the operation please refer to the example "Thermal Printer Basics" contained in the Zerynth Studio.

Step 6: Adding more functionalities

There is a hardware device closely related to Zerynth: the Zerynth Shield:

It is a multiboard shield that presents a set of sensors and actuators, including sensors for touch detection, infrared LED, microphone, light sensor and temperature sensor. Adding Zerynth Shield to the printer would extend its functionality, and perhaps you might be able to create a really useful device. How about try?

Luigi F. Cerfeda (@L_F_Cerfeda) - Zerynth team


VIPER IoT Notes Printer - main.pyPython
# VIPER IoT Notes Printer
# Created by VIPER Team 2015 CC
# Authors: G. Baldi, D. Mazzei

# import everything needed
import streams
from drivers.thermalprinter import thermalprinter
from wireless import wifi
from drivers.wifi.cc3000 import cc3000_tiny as cc3000
# and also import the viperapp module
from libs.apps import viperapp
p = thermalprinter.ThermalPrinter(SERIAL1,19200)


# save the template.html in the board flash with new_resource

# connect to a wifi network

    print("Establishing Link...")"SSID_WiFi",wifi.WIFI_WPA2,"PWD_WiFi")
except Exception as e:

def printMessage(msg):
    p.print_text("VIPER\n",justification="c", style="b")
    p.print_text("\n\n",justification="c", style="b")
    p.print_text("Take me!\n",justification="c", style="b")
#### ViperApp Setup    
# :: Javascript to Python ::
# the following function will be called when the template button is pressed
def show_message(msg):

# configure the viper app with a name, a descripton and the template url
vp = viperapp.ViperApp("Viper IoT Notes Printer","Print your message!","resource://template.html")

# everytime Javascript generates the event "showmsg" the function show_message is called

# run the ViperApp!
# since starts a new thread, you can do whatever else you want down here!
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <div data-role="page">
            <div data-role="header" style="text-align:center"><h1>Viper Printer</h1></div>
            <div role="main" class="ui-content" style="text-align:center">
                <label>Write your note:</label>
                <textarea id='txtData' rows='5' ></textarea>
            <button type=button onclick="javascript:getValue();" id='btnGet'>Print!</button>
            <p id="label"></p>
            <div data-role="footer">Powered by Viper</div>
            function getValue () {
                var text=$("#txtData").val();



Thermal Printer connections
Thermal printer retro


Similar projects you might like

IoT Ambient Light: Zerynth Lamp

Project tutorial by Luigi Francesco Cerfeda

  • 38 respects

Notification IoT Using NeoPixel and Smartphone

Project showcase by Team Geny Studio

  • 12 respects

Smart Halloween Pumpkin Lamp

Project tutorial by Luigi Francesco Cerfeda

  • 1 comment
  • 13 respects

IoT Thermometer Using Python

Project tutorial by Luigi Francesco Cerfeda

  • 29 respects

IoT Garage Door Monitor/Opener with Finger Print Scanner

Project tutorial by

  • 45 respects

IoT Gauge with Arduino, Yaler & IFTTT

Project tutorial by Thomas Amberg

  • 28 respects
Add projectSign up / Login