1 Reply Latest reply on Aug 24, 2015 8:43 AM by DiegoV_Intel

    Using Sparkfun ADC Block question and web page visualization

    KimLorentz

      I am new whit Intel Edison and want to learn how to use it and what is the best way for sombody that is new to programming, I only tryed using arduino and want to use Edison.

       

      First test is using the Sparkfun ADC Board whit ADC1015.

       

      I want to use it as an voltmeter that will show voltage on the web page found on the Intel Edison (Device Information).

      I am using Intel XDK IoT for programming.

       

      Can anyone help me, I have not done something like this before and dont know what to do.

        • 1. Re: Using Sparkfun ADC Block question and web page visualization
          DiegoV_Intel

          Hello KimLorentz,

           

          I haven’t used the SparkFun ADC block but I recommend you to check their tutorial about it: SparkFun Blocks for Intel® Edison - ADC - learn.sparkfun.com. SparkFun provides a sample code that you might want to try.

           

          About the web page visualization, you should modify the script that is executed to display the web page. This script is located in /usr/lib/edison_config_tools/edison-config-server.js. You should pass the values read by the ADC and print them. The example code provided by SparkFun is useful but it is written in C++. You have to write an equivalent code in JavaScript to be used with the web page script. You can use the C++ sample code as a guide to write an equivalent in JavaScript.

           

          I recommend you first to get familiar with the SparkFun sample code and write an equivalent in JavaScript using the XDK. Then, instead of using the web page script, you might want to try writing a simple script to display the values on your browser. The following example shows how to send a picture to a webserver; you might want to check it: Edison/SendImagetoWS.js at master · MakersTeam/Edison · GitHub. You could modify that script to print the values read by the ADC instead of sending an image.

           

          Regards,

          Diego.