1 2 3 4 Previous Next 58 Replies Latest reply on Oct 10, 2014 12:01 PM by mhahn

    Question regarding linux and galileo

    NithishChauhan

      Sir i am B.E. graduate(Electronics & Communication) this year ...i am very interested in hobby projects...so i hav been doing many projects so far....but now i got hands on intel galileo .... i don't know how to use linux and arduino is no problem at all but..what is a linux image.?

      is it necessary for intel galileo related projects..?how am i supposed to get started with linux...?and why linux for embedded applications .?how can i do image processing using galileo..?please do guide me

        • 1. Re: Question regarding linux and galileo
          mhahn

          Hi Nithish,

          I guess it's a good idea to read through the threads in this and other forums. You'll find a lot e.g. on image processing.

          for "disk image" look e.g. at Wikipedia Disk image - Wikipedia, the free encyclopedia

          Linux for embedded devices is pretty common. However, if you run only Arduino you probably won't care the underlying system anyways.

          Why not start with https://software.intel.com/en-us/iot/getting-started?

          Good luck and have fun

          1 of 1 people found this helpful
          • 3. Re: Question regarding linux and galileo
            NithishChauhan

            Sir i hav been doing many projects related to 8051, AVR and Arduino ..but i now hav intel galileo the most powerful microcontroller i ever used....My goal is that i want this galileo interfaced with camera connected to USB host ,take images check for a match available in SD card, if match is as required then store this on to SD card ...at the same time run the arduino code in it to perform necessary actions according to that by controlling some devices connected to its gpio pins....the problem is i don't know anything about Yacto image, booting from SD card , how to store image onto SD card, and writing linux code for that....

            my question is

            where do i get started with image processing using galileo..?

            is the knowledge of Linux OS for this is necessary..?

            is that possible to do within a 1 and half month..?(as for now i am full free)

            • 4. Re: Question regarding linux and galileo
              NithishChauhan

              Sir i hav been doing many projects related to 8051, AVR and Arduino ..but i now hav intel galileo the most powerful microcontroller i ever used....My goal is that i want this galileo interfaced with camera connected to USB host ,take images check for a match available in SD card, if match is as required then store this on to SD card ...at the same time run the arduino code in it to perform necessary actions according to that by controlling some devices connected to its gpio pins....the problem is i don't know anything about Yacto image, booting from SD card , how to store image onto SD card, and writing linux code for that....

              my question is

              where do i get started with image processing using galileo..?

              is the knowledge of Linux OS for this is necessary..?

              is that possible to do within a 1 and half month..?(as for now i am full free)

              • 5. Re: Question regarding linux and galileo
                mhahn

                I guess you would want to start programming Linux native (C, C++, or e.g. Python) for Galileo as e.g. using OpenCV I'd anticipate it would be quite challenging doing image processing on Arduino.

                You still could run a part on it on Arduino. To communicate between Linux and Arduino you could make use of my blog on IoT* - Efficient communication between Arduino* and Linux native processes | Intel® Developer Zone.

                As a starting point for native development you could e.g. start with IoT* - Getting Started | Intel® Developer Zone. You'd find documents & howtos describing also how to get a new SD card image on your SD card. Besides, I think there are quite some posts on this forum dealing with getting started with a new SD card image.

                You don't have to deal with the Yocto build process.

                 

                Whether it's doable in 1.5 months depends mostly on you. In terms of minimum required time I'd estimate:

                • 30 min: setting up system (putting new SD card image ...)
                • 1 h: coding and testing a simple image processing OpenCV program
                • any time (depends on complexity): coding & testing required image processing functionality according to your nees

                If you have done some programming in the past I'd anticipate it's doable in 1.5 months

                • 6. Re: Question regarding linux and galileo
                  NithishChauhan

                  Sir Actually i hav many questions

                  Where to write code for Galileo linux image, what programming language should i use , ?

                  For somebody like me who has only worked with 8-bit microcontroller ...how is it possible to build a linux kernal...? without knowing how actually it works...!

                  How does the linux kernel knows which particular software to execute when booted ...?

                  Even if i skip doing image processing for now how will i know even after booting from SD card it is actually booting from SD card ....?

                  weather there is any software to simulate this environment..?

                  the link provided above contains some difficult codes to understand ...i only was able to understand only few lines......

                  Please help me like where exactly do i need to get started with like a Tutorial? ........any example application that has been built using intel galileo combining both running from SD card as well as utilizing arduino code would be helpful...!

                  • 7. Re: Question regarding linux and galileo
                    mhahn

                    NithishChauhan wrote:

                     

                    Sir Actually i hav many questions

                    Where to write code for Galileo linux image, what programming language should i use , ?

                    For somebody like me who has only worked with 8-bit microcontroller ...how is it possible to build a linux kernal...? without knowing how actually it works...!

                    How does the linux kernel knows which particular software to execute when booted ...?

                    Even if i skip doing image processing for now how will i know even after booting from SD card it is actually booting from SD card ....?

                    weather there is any software to simulate this environment..?

                    the link provided above contains some difficult codes to understand ...i only was able to understand only few lines......

                    Please help me like where exactly do i need to get started with like a Tutorial? ........any example application that has been built using intel galileo combining both running from SD card as well as utilizing arduino code would be helpful...!

                    - maybe easiest for you to start with Python (a python -c "print 'Hello World'" would display "Hello World" on the console)

                    - you don't have to build your own kernel

                    - on older Linux systems "init scripts" in the /etc/rc.* folders define the startup behavior after the initial init script has been started; in newer Linux distributions "systemd" scripts define the behavior. You may as well have several processes (e.g. daemons) running in parallel

                    - if you have a serial cable you will see where the board boots into. If not you can e.g. see by calling "mount" in a console: if you boot from SD card you will see the SD card (/dev/mmcblk*) mounted to / or similar (from SPI it would probably mount to /media/ ... )

                    - what is difficult to understand and on which link? (I provided 2 links)

                    - my blog shows an example of running an Arduino sketch in parallel to Linux native code. Communication done via memory

                    • 8. Re: Question regarding linux and galileo
                      NithishChauhan

                      i only hav 5V power cable and micro USB cable

                      The one more problem is i am very much new to linux....

                      i only know C,C++,Java that's it....

                      the first link has really good code but i did'nt get that properly

                      Sir i hav installed ubuntu on virtualbox so what should i do next

                      For example one quextion is

                           if i just want to boot from linux and run Arduino code  and again switch back to some java code how can i do that ....any guide for that matter..?

                      and where to put the code ...? how should i know that only arduino code is ran first not java code...? i am totally confused

                      • 9. Re: Question regarding linux and galileo
                        mhahn

                        well, that's a good set of languages.

                        just grep the Eclipse IDE from https://software.intel.com/en-us/iot/getting-started which allows you to build & remotely debug for Galileo & Edison in C or C++.

                        It comes already with some initial samples.

                         

                        Arduino code is just on Galileo / Edison is just the process /sketch/sketch.elf compiled and uploaded by the Arduino IDE. It runs in parallel to whatever else is running on the device.

                        So there is no "switching back". You are running a full multitasking Linux OS.

                         

                        You would have to synchronize your processes in order to make sure only one or the other is running. Or better just run both and wait for certain conditions to trigger further run.

                        • 10. Re: Question regarding linux and galileo
                          NithishChauhan

                          thank you for a quick reply......

                          So first i need my SD card to hav all necessary files on it right..? and then i hav to write the code in that ide ,compile and i need to put that on to SD card right..?

                          • 11. Re: Question regarding linux and galileo
                            mhahn

                            yes. Although the IDE directly connects to your device so you don't have to manually put anything there. You can even run / debug the binary from within the IDE on the target.

                            • 12. Re: Question regarding linux and galileo
                              NithishChauhan

                              Every code there contains this header please explain... #include "mraa.hpp"

                              and most of code starts like int main (int argc, char **argv)){} so how does linux starts this by passing arguments ...?

                               

                              if we do not actually write code for linux kernal...then how can we make process switch..?

                              which process to switch ? and when to switch...>? and how to switch...?

                               

                              is it possible to write code similar in Java...?any resources..?

                              is there a pdf containing how to access the gpio pins ..?

                               

                              because sir what i want to do is

                               

                              get the arduino sketch runnig first  and whenever it sensors trigger hold the process capture an image from webcam perform some action like getting rgb values usnig some tools in Java and switch back to arduino code use these rgb values  depending on this control some actions like generating pwm....and write onto a file regarding the action performed and repeat the same forever   

                              before all this i want galileo to receive  8bytes of data serially...(only one after boot)

                              • 13. Re: Question regarding linux and galileo
                                mhahn

                                You would need to start the binaries are write scripts to start them (e.g. systemd script to auto start it).

                                I am not sure there are images which already contain Java packages. So if you speak C/C++ it probably is easier to start that way.

                                mraa actually wraps the IO internals. So you don't have to worry about.

                                You don't switch processes. The Arduino sketch continuously runs so probably also does your image capture process.

                                You just need to communicate between those processes. See e.g. my description on IPC

                                 

                                On serial - just listen to serial and get the data

                                • 14. Re: Question regarding linux and galileo
                                  NithishChauhan

                                  Ok sir i will surely try  these out in C and i will come back to you with more doubts after i do all these....Thank you ..you helped me lot....

                                  1 2 3 4 Previous Next