14 Replies Latest reply on Aug 7, 2017 1:56 PM by Intel Corporation

    Displayin graph on computer without using serial communication

    GCay

      Hi all,

       

      I am using Intel Edison Breakout Board. I am getting data from photodetectors and my aim is displaying these signals as a graph. I can do it on my computer via serial port, however; I want to do it wirelessly.

       

      I programmed Edison with Python and MRAA library to receive the data and plot but since breakout board does not have any display, it cannot show the graph. Can I see the graph on my computer without using serial communication?

       

      Here is the code that I use:

       

      #!/usr/bin/env python

       

       

      import mraa

      import time

      import sys

      import urllib

      import re

      import matplotlib.pyplot as plt

      import matplotlib.animation as animation

       

       

      plt.ion()

       

       

      fig = plt.figure()

      ax = fig.add_subplot(111)

       

       

      data = []

       

       

      led = mraa.Gpio(13)

      led.dir(mraa.DIR_OUT)

       

       

      det = mraa.Aio(0)

       

       

      while True:

          led.write(1)

          time.sleep(2)

          value = int(det.read())

          print value

          led.write(0)

          time.sleep(0.5)

          value = int(det.read())

          print value

       

       

          data.append(value)

          secPlot = ax.plot(data)

          fig.canvas.draw()

       

      What should I add it to send the graph to computer wirelessly?