/*
 * Author: Brendan Le Foll <brendan.le.foll@intel.com>
 * Author: Petre Eftime <petre.p.eftime@intel.com>
 *
 * Copyright (c) 2015 - 2016 Intel Corporation.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

/**
 * @file
 * @ingroup grove
 * @brief Analog Input
 *
 * Demonstrate how to read an analog voltage value from an input pin using the
 * MRAA library, any sensor that outputs a variable voltage can be used with
 * this example code.
 * Suitable ones in the Grove Starter Kit are the Rotary Angle Sensor, Light
 * Sensor, Sound Sensor, Temperature Sensor.
 *
 * @hardware Analog sensor connected to pin A0 (Grove Base Shield Port A0)
 *
 * @req mraa.jar
 *
 * @date 19/08/2015
 */
package iotdk.example;

import mraa.Aio;
import mraa.Platform;
import mraa.mraa;

public class AnalogIn {

    public static void main(String[] args) {

        // check that we are running on Galileo or Edison
        Platform platform = mraa.getPlatformType();
        if (platform != Platform.INTEL_GALILEO_GEN1 &&
                platform != Platform.INTEL_GALILEO_GEN2 &&
                platform != Platform.INTEL_EDISON_FAB_C &&
                platform != Platform.MRAA_INTEL_JOULE_EXPANSION) {
            System.err.println("Unsupported platform, exiting");
            return;
        }

        // create an analog input object from MRAA using pin A0
        Aio pin = new Aio(0);

        // loop forever printing the input value every second
        while (true) {
            long value = pin.read();
            System.out.println(String.format("Pin value: %d", value));
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                System.err.println("Sleep interrupted: " + e.toString());
            }
        }
    }
}
@@ -1244,61 +1244,11 @@
 /**%0A
- * @file%0A * @ingroup grove%0A * @brief Analog Input%0A
  *%0A
+
  * D
@@ -1553,122 +1553,52 @@
 %0A * 
-@hardware Analog sensor connected to pin A0 (Grove Base Shield Port A0)%0A *%0A * @req mraa.jar%0A *%0A * @date 19/08/2015
+TODO: Use platform with Analog capabilities.
 %0A */
@@ -1755,454 +1755,8 @@
  %7B%0A%0A
-        // check that we are running on Galileo or Edison%0A        Platform platform = mraa.getPlatformType();%0A        if (platform != Platform.INTEL_GALILEO_GEN1 &&%0A                platform != Platform.INTEL_GALILEO_GEN2 &&%0A                platform != Platform.INTEL_EDISON_FAB_C &&%0A                platform != Platform.MRAA_INTEL_JOULE_EXPANSION) %7B%0A            System.err.println(%22Unsupported platform, exiting%22);%0A            return;%0A        %7D%0A%0A
     
@@ -2244,9 +2244,10 @@
 %7D%0A    %7D%0A
-
 %7D
+%0A

Remove hardware check from analog in