3 Replies Latest reply on Dec 11, 2017 6:55 AM by FGT

    Multithreading examples for Intel Galileo

    Poornima

      Hi,

       

      We are doing multithreading program for Intel Galileo to do a set of tasks.We have to integrate Galileo, PIC microcontroller, Gesture sensor and Webcam.

       

      Thread 1. We have to send commands from Galileo to PIC for rotating the servo motor, read light intensity using ADC values,

       

      Thread2. We have to check sudden change in the light intensity, proximity sensor value, or else if a picture is taken in the web cam.

       

      Thread 3. We have to upload the values and picture to  a remote server.

       

      Any helpful links to pthread examples for sensor monitoring ? Apart from, printing helloworld using multithreading?

        • 1. Re: Multithreading examples for Intel Galileo
          FGT

          Any helpful links to pthread examples for sensor monitoring ? Apart from, printing helloworld using multithreading?

          Well, maybe you do not need more than that, since your problem is well described in the 3 threads you mentioned.

           

          Do you have any possibility to change the number and specific tasks of those 3 threads? Maybe it would be better to subdivide  tasks in threads if tasks are not related to each other.

           

          Have you already checked you are able to control every single sensor and communication with an Intel Galileo?

           

          Do you really need a PIC for rotating the servo motor? (you can move a servo from the Intel Galileo.

           

          HTH,

           

          Fernando.

          • 2. Re: Multithreading examples for Intel Galileo
            Poornima

            Hello Fernando,

             

            Yes.The problem statement is fixed. Also I have checked the sensors.They are working. In fact the task done by each thread when done using seperate programs is done properly.

             

            I need some multithreading related help foruch IoT task of montitoring the sensors. Especially using mutexes and pthread library.

             

            Thanks,

            Poornima

            • 3. Re: Multithreading examples for Intel Galileo
              FGT

              I need some multithreading related help foruch IoT task of montitoring the sensors. Especially using mutexes and pthread library.

              I see... it seems to be that your problem is about concurrency and the pthreads library... I'd suggest you look for those toturials, actually. Your problem is related to the "classical" concurrency problems like "producer/consumer" and "synchronization" problems. I've not seen specific examples on multithread and sensor monitoring.

               

              HTH,

               

              Fernando.