Hi Aarushi,

I am assuming that your Grove sensor is similar to this one.
<http://wiki.seeed.cc/Grove-Moisture_Sensor/>

The code in the Water Conservation Demo which reads from a real,
non-simulated, sensor assumes that the sensor is a Mod My Pi Soil Moisture
Sensor <https://www.modmypi.com/electronics/sensors/soil-moisture-sensor>.
Your Grove sensor returns moisture readings as values between 0-950. In
contrast, the digital output of the Pi Soil Moisture Sensor give only a
simple "on" or "off" for whether moisture is present.

I'm not sure which method for connecting your Grove sensor to the Raspberry
PI is best, but whichever you choose, you can modify the
SprinklerSimulatorWithSensor code
<https://github.com/IBMStreams/streamsx.waterConservation.starterKit/blob/master/com.ibm.streamsx.smartsprinkler.edgent/src/com/ibm/streamsx/smartsprinkler/edgent/SprinklerSimulatorWithSensor.java>
to read from your Grove sensor instead of the Mod My Pi Soil Moisture
Sensor. Just change the constructor to initialize communication with your
sensor, and then change the getMoisture method to read from your sensor and
set the moisture value.

You can run the Water Conservation Demo on any IoT board that has a Java7
or Java8 JVM, assuming you remove the parts of SprinklerSimulatorWithSensor
that directly depend on the Raspberry PI (such as reading from GPIO pins).

Let me know if any of this is unclear, or if you need help modifying the
code.

-Will



On Wed, Jul 5, 2017 at 2:44 AM, MITTAL Aarushi <
aarushi.mit...@soprasteria.com> wrote:

> Hi Samantha,
>
>
>
> I have successfully launched an application on bluemix following your
> tutorial for Smart Water Sprinkler:
>
> https://github.com/IBMStreams/streamsx.waterConservation.
> starterKit/blob/master/com.ibm.streamsx.smartsprinkler.edgent/README.md
>
>
>
> I have successfully been able to receive simulated readings.
>
>
>
> Now , I want to get real readings from a moisture sensor.
>
>
>
> There are 2 problems here :
>
> 1)      I have a Grove moisture sensor that maybe difficult to connect to
> a Pi. But the I am not sure if the Edgent application can be written on any
> other iot board ,except a Pi.
>
> Though I have found a way to directly connect the grove sensor to Pi, I am
> not too confident with this approach.
>
> http://www.switchdoc.com/2016/02/tutorial-grove-connector-
> project-examples-for-raspberry-pi-arduino/
>
>
>
> 2)      I have an Arduino base shield on which many grove sensors can be
> connected.
>
> I can mount my shield(having the grove sensor connected ) on my Arduino
> uno .
>
> After that , I can connect this entire Arduino setup to my raspberry Pi 3
> via Serial Communication.
>
>
>
> Please guide me if it would be a good idea , to get the sensor readings
> from the Arduino to the pi and then send them to the Edgent application(on
> the Pi) for Edge computing.
>
>
>
> I have to submit this solution by 7th July 2017.
>
> Please help.
>
>
>
> Regards,
>
> *Aarushi Mittal*
>
> *IOT, Digital Transformation Team*
>
> *[image: cid:image001.png@01D2C80A.F0430D40]*
>
> Sopra Steria
> A-67, Sector 64
> Noida 201301 - U.P. India
>
> Mobile: +91-7065508866 <+91%2070655%2008866>
> aarushi.mit...@soprasteria.com - www.soprasteria.in
>
>  [image: cid:image002.gif@01CF42C0.CFE0E450]
>
> The content of this message may be confidential, legally privileged and
> protected by law. Unauthorized use, copying or disclosure of any of it may
> be unlawful. If you are not the intended recipient please notify the sender
> and remove it from your system. While attachments to this e-mail are
> checked for viruses, we do not accept any liability for any damage
> sustained by viruses.
> Before printing, think about the environment.
>
>
>

Reply via email to