How to negate vernose Pymata messages?

Questions and discussions about our Arduino add-on board for the Raspberry Pi

How to negate vernose Pymata messages?

Postby arnoldbail » Sat Sep 27, 2014 12:02 pm

Hi,

I'm a relative noob with the Pi Co-op and I'm not sure where to ask this question?

How do I negate the runtime Pymata/Firmate messages?

Opening Arduino Serial port /dev/ttyS0
Please wait while Arduino is being detected. This can take up to 5 seconds ...
Board initialized in 0 seconds
Total Number of Pins Detected = 20
Total Number of Analog Pins Detected = 6
arnoldbail
 
Posts: 7
Joined: Thu Jun 19, 2014 4:40 pm

Re: How to negate vernose Pymata messages?

Postby Alan » Sun Sep 28, 2014 11:35 am

Hi there,

You need to go into the PyMata/PyMata source directory, then open up each of the .py files in turn and search for 'print' lines. You can comment these out, or ideally you could do what is done in ino_uploader.py which is to put

import logging

at the top of the file, and then replace print calls to logging.info, logging.warning etc. This way you can use the Python logging module to redirect error messages to either the terminal or a log file (or both).

Once you've made the code change you need to reinstall PyMata so that the changes work in your scripts. This is done from the main PyMata directory by running

sudo python setup.py install

Hope that helps, let me know if you need any more detail anywhere.

Regards

Alan
Alan
Site Admin
 
Posts: 311
Joined: Fri Jun 14, 2013 10:09 am

Re: How to negate vernose Pymata messages?

Postby arnoldbail » Sun Sep 28, 2014 11:52 am

Thanks Alan,

Arnold
arnoldbail
 
Posts: 7
Joined: Thu Jun 19, 2014 4:40 pm


Return to Pi Co-op

Who is online

Users browsing this forum: No registered users and 0 guests