Tell us about yourself!

Complete Your Profile
  • Super Simple Raspberry Pi 433MHz Home Automation

    I needed to use ReceiveRF.py on a headless pi without X11. And so, I made some changes to the program to have it write to a PNG file instead of needing X11, and I wanted to share them...At the top, make your imports section look like this:from datetime import datetimeimport numpy as npimport matplotlib as mplmpl.use('Agg')import matplotlib.pyplot as pyplotimport RPi.GPIO as GPIOAnd down in the "Plotting results" section, like this: print '**Plotting results**' fig = pyplot.figure(figsize=[70, 2], dpi=300) pyplot.plot(RECEIVED_SIGNAL[0], RECEIVED_SIGNAL[1], linewidth=1) pyplot.axis([0, MAX_DURATION, -1, 2]) pyplot.xticks(np.arange(0, MAX_DURATION, step=0.01)) #pyplot.show() pyplot.tight_layout() pyplot.savefig("plot.png") pyplot.close(fig)Those changes wil...

    see more »

    I needed to use ReceiveRF.py on a headless pi without X11. And so, I made some changes to the program to have it write to a PNG file instead of needing X11, and I wanted to share them...At the top, make your imports section look like this:from datetime import datetimeimport numpy as npimport matplotlib as mplmpl.use('Agg')import matplotlib.pyplot as pyplotimport RPi.GPIO as GPIOAnd down in the "Plotting results" section, like this: print '**Plotting results**' fig = pyplot.figure(figsize=[70, 2], dpi=300) pyplot.plot(RECEIVED_SIGNAL[0], RECEIVED_SIGNAL[1], linewidth=1) pyplot.axis([0, MAX_DURATION, -1, 2]) pyplot.xticks(np.arange(0, MAX_DURATION, step=0.01)) #pyplot.show() pyplot.tight_layout() pyplot.savefig("plot.png") pyplot.close(fig)Those changes will have it plot to the file plot.png and will not require X11 to run.

    View Instructable »