Author Topic: mcModule goes christmas tree  (Read 509 times)

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
mcModule goes christmas tree
« on: December 20, 2016, 06:30:10 am »
Hello.
I was inspired from the mcThings video to monitor when it is time to water the christmas tree so I just had to implement that on my tree.

I am using a simple soil humidity detection module connected to a mcModule on a  digital input .

And a very simple code that is checking every 5 minute if the water level is ok or not

Code: [Select]
Shared Event measureMoisture() RaiseEvent Every 5 Minutes
        enableMoistureLevel = True 'turn on
        Thread.Sleep(500000) 'sleep
       
        Dim needWater As Boolean
        Dim payload As ListOfByte = New ListOfByte()
       
        needWater = MoistureLevel
       
        If MoistureLevel Then
            payload.Add("true")
        Else
            payload.Add("false")
        End If
       
        Lplan.Publish("mcModule/000104E6/livingroom/christmastree/needwater", payload)
       
        enableMoistureLevel = False 'turn off
    End Event


« Last Edit: February 14, 2017, 04:30:39 pm by mc-T2 »

Share on Facebook Share on Twitter

Like Like x 1 View List

mc-T2

  • Administrator
  • Sr. Member
  • *****
  • Posts: 252
  • mc-Things! The opportunities are endless!
  • Location: Canada
    • View Profile
Re: mcModule goes christmas tree
« Reply #1 on: December 20, 2016, 12:48:53 pm »
Awesome! Great Job!
Need more mc-Modules, mc-Gateways or other mc-Things? Check out our product page: www.mcthings.com/products. mc-Development kits are available too!
Check out a live Dashboard using mcThings and Losant! Click here: https://goo.gl/ST43hB

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: mcModule goes christmas tree
« Reply #2 on: December 20, 2016, 12:52:18 pm »
As you could see, Iam using two different cases one for the sensor and one for the mcModule. Of course it would be better to create one case that includes both modules. Maybe something to fix for next year :)

ajohnson

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: mcModule goes christmas tree
« Reply #3 on: December 22, 2016, 09:42:55 am »
What are you using to hold the 120 case shut?  I've been using tape

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: mcModule goes christmas tree
« Reply #4 on: December 22, 2016, 09:53:43 am »
Hello.
Iam not using anything, the case is perfect fit so the lid just stays in place.
(mcModule 110)

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: mcModule goes christmas tree
« Reply #5 on: January 05, 2017, 09:42:11 am »
I have been experimenting with the same moisture sensor setup and code that Tom uses in his video using both a stand alone module and the MC dev board but, I notice a big variation in output voltages between the two even when using the same moisture sensor.
Has anyone else tried this on the MC dev board? Was there any difference in the voltage output from the sensor? Is this something to be expected or am I doing something wrong?

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: mcModule goes christmas tree
« Reply #6 on: January 05, 2017, 09:46:03 am »
If you find a good enclosure that houses both the module and sensor please pass along.

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: mcModule goes christmas tree
« Reply #7 on: January 05, 2017, 11:57:09 am »
I have not tested the analog output only the digital, in this project I only need to know if there is any water on the sensor or not.