1 2 Previous Next 16 Replies Latest reply on Jun 28, 2016 12:49 PM by Intel Corporation

    INTEL EDISON BOARD2 interfacing with analog sensor

    rahul147258

      Hi,

      can anyone guide me which plateform suits for best inorder to accuire maximum samples from analog sensor in one second and print through GPIO pins?

        • 1. Re: INTEL EDISON BOARD2 interfacing with analog sensor
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello rahul147258,

          That would mostly depend on your personal preference and how you would like to take advantage of Edison's capabilities. I mean, you will probably get the same performance despite what IDE you use but if you are comfortable using Eclipse and skilled in C/C++ programming, then you will be comfortable using the Intel System Studio. If you are familiar with Eclipse you know that if has great debugging capabilities that can help you optimize your code. If you would like an IDE where you can work with Node.JS then the Intel XDK would be your choice and of course you could use the Arduino IDE or compile directly on Linux.

          My personal preference is to use the mraa library (The System Studio and XDK also use it) and a text editor in order to write my scripts (on any programming language) and then compile them directly on Linux. If you are interested in creating a big project I would recommend you this approach, the System Studio or XDK because with Arduino you don't have some Linux advantages that can be used more efficiently on C/C++, JavaScript, Java, Python with mraa and all the other Linux third party libraries available out there.

          I hope this information helps you.
          Peter.

          • 2. Re: INTEL EDISON BOARD2 interfacing with analog sensor
            rahul147258

            Thanks Peter,

             

            but I am beginner to Intel Edison board programming. Suppose If I want to interface the analog sensor through Intel Edison break out board. Which will be more efficient other than ARDUino framework. beacause I am not ablet o increase ha sampling data from sensor based on my requirement if u can hep me help me out here also please

            thank you

            I have gone through Eclipse environment. Will it be useful inured to read the data from sensor (accelerometer) and process it using C/c++,and can I able to set sampling frequency based on our requirement  through MRAA library,if yes..means how can I do that? Can u help me out ..bit detail. Sorry for troubling..

            • 3. Re: INTEL EDISON BOARD2 interfacing with analog sensor
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi rahul147258,
               
              You are using the ADXL335, am I right? If so, then my suggestion would be that in deed you go for the mraa/upm approach. As I mentioned before, I prefer compiling with GCC than with an IDE, but if prefer a graphic environment then Eclipse should work very well for you.
              The reason why I'd choose mraa/upm is because there's a upm module for the ADXL335. You can find its class reference in http://iotdk.intel.com/docs/master/upm/classupm_1_1_a_d_x_l335.html and a working example in https://github.com/intel-iot-devkit/upm/blob/master/examples/c%2B%2B/adxl335.cxx.
               
              I suggest you to try this and let us know how it goes, we would be more than glad to help you in case you encounter any issue.
              -Peter.

              • 4. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                rahul147258

                Hi Peter,

                 

                The line which u have mentioned here "As I mentioned before, I prefer compiling with GCC than with an IDE" can u tell me if I want to compile my code  of adxl 335,

                Do I have to write the program on eclipse ??

                If yes..what are the drivers and libraries needed inorder to run the code which is mentioned in ur link.

                Again my same question How can I increase my sampling rate ??

                 

                Thanks

                • 5. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hi rahul147258,

                  If you would like to write a C/C++ script, you have two options. The first, as you mentioned, is to use Eclipse. This would give you the option of having a GUI with many tools. The second option would be to use a regular text editor and GCC/G++ (GCC for C and G++ for C++). This second option is a little bit more "advanced" since it gives you a lot less options for debugging but it tends to be more stable. 

                  The same code can be compiled with Eclipse and GCC/G++ (in fact Eclipse ends up using those compilers). All you need to have in this case is mraa and upm installed and updated (if you flashed Yocto 3.0, you should have the latest versions installed). If you don't have them you can download it from the official repo. In case you haven’t set up the repo, you simply have to modify the file /etc/opkg/iotkit.conf to contain the following lines:

                  src iotdk-i586 http://iotdk.intel.com/repos/3.0/iotdk/i586/
                  src iotdk-intel-core-2-32 http://iotdk.intel.com/repos/3.0/iotdk/intel_core2_32/
                  src iotdk-x86 http://iotdk.intel.com/repos/3.0/iotdk/x86/
                  src iotdk-core-2-32 http://iotdk.intel.com/repos/3.0/iotdk/core2-32/
                  src mraa-upm http://iotdk.intel.com/repos/3.0/intelgalactic/opkg/i586/

                  And then entering the commands:

                  opkg update
                  opkg install mraa upm

                  After this the libraries should be ready. So, if you would like to compile directly from Linux, let's say a simple blink in C, like following example:

                  #include <stdio.h>
                  #include <string.h>
                  #include <unistd.h>
                  #include "mraa/gpio.h"

                  int main(int argc, char** argv)
                  {
                      mraa_platform_t platform = mraa_get_platform_type();
                      mraa_gpio_context gpio, gpio_in = NULL;
                      int ledstate = 0;
                      gpio = mraa_gpio_init(13);
                      fprintf(stdout, "Welcome to libmraa\n Version: %s\n", mraa_get_version());

                      mraa_gpio_dir(gpio, MRAA_GPIO_OUT);

                   while(1)
                   {
                    ledstate = !ledstate;
                    mraa_gpio_write(gpio, ledstate);
                    sleep(1);
                   }
                      return 0;
                  }

                  You will have to execute the following command (assuming that the code is called blink.c and that you are entering the command from the same directory where the script is stored):

                  gcc blink.c -o blink_executable -lmraa

                  And to run it you would use:

                  ./blink_executable

                  The command for C++ is exactly the same but instead of using GCC, we would use G++. So, it would look like this (assuming that this time the blink script is written in C++ and is called blink.cpp):

                  g++ blink.cpp -o blink_executable -lmraa.

                  Now, regarding your question about the sampling rate, I would have to agree with the suggestion provided by @Flo1991 in https://communities.intel.com/message/401144#401144.

                  I hope this information helps you, I would be glad to answer any other doubts you might have.
                  -Peter.

                  • 6. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                    rahul147258

                    Thanks,

                    You mean I have to run ECCLIPSE ON Linux PLATEFORM?? Correct me if I am wrong??

                    cant I download on  eclipse on windows and attach with Intel Edison and run the interfacing..

                     

                    One more thing can I get the detailed Hardware description of this intel Edison board so that understanding will be much easier. Because I feel the Description is not giving proper information of utilizing the ""Intel Edison Arduino break out board"" so if u could provide the link from which I can get more information in detail. Because I have searched i din get more information regarding that?? please..

                     

                    Whatever the link which u have sent above is those are for Linux right?? please look any detail description in order to understand the hardware lever and their interfaces utilization... of Intel Edison board...

                     

                    Thanks

                    • 7. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      In this case I believe I might have confused you. You can in fact download Eclipse on your Windows PC. Actually you can find its user guide, which contains a lot of useful information (including how to install it on Windows) that could clear your doubts, it is found in https://software.intel.com/en-us/intel-system-studio-iot-edition-guide-for-c.
                       
                      The explanation I posted above is if you would like to compile your code directly on Edison's internal Linux console. Nevertheless, as I also mentioned, you can always use Eclipse.
                       
                      Regarding your question about information about Edison's hardware, have you checked the hardware guides for the module and both expansion boards? They can be found in:
                       
                      Module:
                      http://www.intel.com/support/edison/sb/CS-035274.htm
                       
                      Mini breakout board:
                      http://www.intel.com/support/edison/sb/CS-035252.htm
                       
                      Arduino expansion board:
                      http://www.intel.com/support/edison/sb/CS-035275.htm
                       
                      I hope this clears your doubts. If you have any other question, don't hesitate to ask.
                      -Peter.

                      • 8. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                        rahul147258

                        Thank you

                        now I am following the steps inorder to make connectivity with Intel Edison with eclipse for that I have downloaded the latest yocto image from the website IoT - Intel® XDK IoT Edition Troubleshooting and FAQ | Intel® Software  .here i  have follow all the setup steps for executing putty and make ssh connection on windows but I cant go beyond step 4 ..after that it is not directing to Intel Edison I have booted also. But then too its not directing..so I taught to do manually. so I downloaded again Linux image and extracted in Edison folder. But when I am navigating from command windows it says file has not found.

                         

                        one last question when wanted to communicate my intel Edison with eclipse c/c++ deverloper IDE I am getting the error IoT - Installing the Intel® System Studio IoT Edition | Intel® Software 11)can u tell me which JDK to install  .Java SE - Downloads | Oracle Technology Network | Oracle  from this link there are several jDK which one to install and where to store that???.

                         

                        please let me know soon..

                         

                        thank you

                        • 9. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                          Intel Corporation
                          This message was posted on behalf of Intel Corporation

                          I'm sorry, I don't understand your question. Are you trying to flash the latest Yocto image in your Edison? If so, I suggest you to flash the image with Flash Tool Lite, it can be found in https://software.intel.com/en-us/iot/hardware/edison/downloads as well as the latest image and a guide on how to use Flash Tool Lite. If that's no your question, please correct me.

                          Regarding your question about connecting your Edison to SSH, make sure your board is connected to the same network as your PC. Otherwise your PC will not be able to detect your board.

                          You can install the latest version of the JDK from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. However, that message sometimes appears even after installing the JDK. I have personally experienced this behavior but it hasn't affected the IDE's functionality. 

                          Let me know how it goes, I'll be glad to help.
                          -Peter.

                          • 10. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                            rahul147258

                            Hi thanks for ur reply,

                             

                            Now I am facing one problem. When I want to connect my Intel Edison board with my PC..i have followed these steps which is given in this link IoT - Blinking an LED using C/C++ | Intel® Software  here till step 8 I am clear about it.

                            however when I am going to step 9 I am writing user id and password which I set for board. But I am not able to connect it..it says error "connection not found".

                            one more thing from step 6 I am not getting any ip address or any thing as like they have given in this link can anyone help me out??

                             

                            thanks

                            • 11. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              The reason why you don't find any IP address in step 6 is probably because you don't have Bonjour installed, Intel's software uses Bonjour services to find devices (Edison, Galileo) on your same network. Nevertheless, not automatically finding an IP address on this will not cause any issues if you have access to your board's IP addresses. I personally don't use Bonjour and it has never caused me any trouble. You only need to add a name for the connection the board's IP address and then you can continue, the password will be requested later.
                               
                              For steps 9 and 10, you have remember that using Eclipse requires you to connect your board and PC to the same network. Is this the case? If so, could you please send me a screenshot of your Edison's console output to the command ifconfig and a screenshot of your PC's cmd terminal output to the command ipconfig?
                               
                              I would also like to ask you if you've ever tried to establish an SSH connection to your board? Have you succeeded?
                              -Peter.

                              • 12. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                                Intel Corporation
                                This message was posted on behalf of Intel Corporation

                                Hi rahul147258,

                                I saw that you posted your last question in https://communities.intel.com/thread/103551. We will continue the support for this question in there.

                                -Peter.

                                • 13. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                                  rahul147258

                                  Thanks Peter,

                                  now I am able to get connect with SSH and I have created one network and on that particular network I am connecting both MY PC and Intel Edison.

                                  and I have solve the error of compiling actually in setting we need to make some change in "include paths".

                                  finally I am able to upload the blink example and run on Intel Edison via eclipse. Thanks for ur support.

                                  Now I am going to interface Sensors with intel Edison board if I get any problem I will post it..thanks again.

                                  • 14. Re: INTEL EDISON BOARD2 interfacing with analog sensor
                                    Intel Corporation
                                    This message was posted on behalf of Intel Corporation

                                    Hi rahul147258,

                                    That's great to hear! I glad you got it working, and indeed, if you ever have any other doubts don't hesitate to come back to the community.

                                    -Peter.

                                    1 2 Previous Next