Python with Arduino LESSON 10: Installing Drawnow to Allow Live Plotting with Matplotlib

Our objective with this series of lessons is to plot live data coming from arduino using Python and Matplotlib. We have taken a few lessons to get familiar with Matplotlib, and we have built a circuit to stream live data from arduino to python. We need to install one more library to enable Matplotlib to plot live sensor data in real time. The magic library is called drawnow. The bad news is that this library is hard to install on windows. The good news it that PIP installs it very easy. So, if you have not done so already, you need to go to Python with Arduino LESSON 6 and install PIP. PIP makes it very easy to install drawnow.

2 thoughts on “Python with Arduino LESSON 10: Installing Drawnow to Allow Live Plotting with Matplotlib”

  1. Sir
    Your tutorials are beautiful!! These are really informative and have motivated me even more to delve deeper into python. This will open up a new world of possibilities for my future projects. Thank you very much for sharing your knowledge. Its one thing to have knowledge but its completely different to share it patiently with others. I’ll be watching all the tutorials on your blog.
    Regards
    Manpreet

  2. This process no longer works. I get the following error. Do you have an updated method?

    C:\Users\wja2c>pip install drawnow
    Collecting drawnow
    c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
    SNIMissingWarning
    c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
    InsecurePlatformWarning
    Using cached drawnow-0.71.2.tar.gz
    Could not import setuptools which is required to install from a source distribution.
    Traceback (most recent call last):
    File “c:\python27\lib\site-packages\pip\req\req_install.py”, line 387, in setup_py
    import setuptools # noqa
    File “c:\python27\lib\site-packages\setuptools\__init__.py”, line 12, in
    import setuptools.version
    File “c:\python27\lib\site-packages\setuptools\version.py”, line 1, in
    import pkg_resources
    File “c:\python27\lib\site-packages\pkg_resources\__init__.py”, line 49, in
    from six.moves import urllib, map, filter
    ImportError: cannot import name urllib

Leave a Reply

Your email address will not be published. Required fields are marked *