0 Replies Latest reply on Aug 26, 2014 11:12 AM by Tom1988

    interfacing python/c/c++ programs with arduino sketches

    Tom1988

      Hi guys,

       

      I am scoping out a project with a Galileo that requires Wifi, a display (an arduino LCD screen, I2C or SPI) and a sensor (SPI or UART). I'm just thinking through in my mind how it will work and would appreciate any advice that you could offer. I'm thinking of creating an application program in Python to process the incoming data (perform some calculations etc) from the sensor. I was going to use existing arduino sketches to take the incoming sensor data via SPI and pass it to the python program. I was also going to use existing arduino sketches to display the output on the screen and send some processed data over Wifi also.

       

      I am thinking that this is practically the same as Sparkfun's unread email counter tutorial (except no sensor data).

      https://learn.sparkfun.com/tutorials/galileo-unread-email-counter/the-arduino-sketch

       

      My question is what would be the best way to interface the python application program with the arduino sketches? The sparkfun example writes the data to a file which is then read to display the content. Is this the only option? Or are there other options? There will be a lot of data coming in via the sensor and I need the application to run as quickly as possible. Would you have any other suggestions to improve the concept?

       

      Also, something else that I have no experience with, but is it possible to write a python script to take the data straight in via SPI and not use an Arduino sketch? 

       

      Also, if I wanted to write the application program in c/c++, would that be possible? Would I have to do it using the IoT dekit? Do you write the c/c++ program in the Eclipse IDE and then load it onto the board like an arduino sketch? Can Arduino sketches interact with c/c++ programs?

       

      https://www.google.com/#q=iot+developer+kit+intel

       

      Many thanks for your help, I understand that there is quite a lot of vague questions here

      Tom