3 Replies Latest reply on Jan 17, 2015 4:26 PM by AHoopyFrood

    Running the IoTKit from Arduino, with WiFi

    AHoopyFrood

      Has anyone successfully transferred data to a component in the Analytics Dashboard over WiFi with their Edison and an Arduino sketch? It seems to me that the example sketches are still setup for a hardwired internet connection on the Galileo (use of the Ethernet.h library). I've set everything up and posted fake data through the Edison's command line but the Arduino sketches do nothing. I've set the IoTkit.h IP to both my external and internal IPs and still nothing comes through when trying the register or simple_example sketches included with the library.

       

      Is this going to be a matter of re-writing the IoTkit.h library to work with the WiFi.h library, do I have the wrong external IP perhaps, or am I just missing something entirely?

        • 1. Re: Running the IoTKit from Arduino, with WiFi
          JPMontero_Intel

          Hi AHoopyFrood,

           

          When you are using the IoTkitSimpleExample, Is the serial monitor getting values or is it always reading 0 degrees? If you are always getting 0 , you can check if you have the ADC active, you can try this by entering the following command in the Linux console, if you get an error you need to enable it

          cat /sys/bus/iio/devices/iio:device1/in_voltage0_raw
          

           

          If you get an error use this commands to enable it:

           # echo 200 > /sys/class/gpio/export
           # echo 232 > /sys/class/gpio/export
           # echo 208 > /sys/class/gpio/export
           # echo 214 > /sys/class/gpio/export
           # echo low > /sys/class/gpio/gpio214/direction
           # echo high > /sys/class/gpio/gpio200/direction
           # echo low > /sys/class/gpio/gpio232/direction
           # echo in > /sys/class/gpio/gpio208/direction
           # echo high > /sys/class/gpio/gpio214/direction
          

           

          Check this to see if it works.

           

          Regards,
          JPMontero_Intel

          1 of 1 people found this helpful
          • 2. Re: Running the IoTKit from Arduino, with WiFi
            AHoopyFrood

            Thanks for the reply.

            I'm not even trying to pull from the ADC. I've removed that part of the code and instead just set 'temp' to a constant as I'm only really trying to get the iotkit code running so I can use it in a different project. The serial monitor prints the value I've assigned but the data never makes it to the dashboard.

             

            I probably don't fully understand how these work but does the Ethernet.h library work when the Edison is already connected to Wifi outside of the Arduino environment?

            • 3. Re: Running the IoTKit from Arduino, with WiFi
              AHoopyFrood

              I found the issue, as did someone else apparently (kind of).

              There was/is an error in the samples included with the library. To send the data they use "iotkit.send("temperature sensor", temp);" but it should read "iotkit.send("temperature", temp);". If you look at the exposed files on the github this is corrected but the examples included in the .zip are still wrong.

              1 of 1 people found this helpful