Author Topic: Re-Post "TempSensor mcModule"  (Read 152 times)

mcThings

  • We Connect Things To The Internet... That Can't Be Plugged In.
  • Administrator
  • Jr. Member
  • *****
  • Posts: 68
    • View Profile
    • www.mcthings.com
Re-Post "TempSensor mcModule"
« on: June 06, 2016, 11:01:43 am »
kristofferis2din Support9
TempSensor mcModule
0
Hello.
Is the TempSensor code in mcStudio broken?
mcStudio – 0.7-888
mcGateway – 0.6-354
mcModule – 0.7-356
Test case:
Open mcStudio and load Example Project Temperature.
Debug the code and it will fail when it tries to fetch the temperature
Dim TempC As Float = TempSensor.GetTemp
I have also tried to create a new project and Add library code TempSensor and the rest of the code just simple to read the temperature.
And it fails the same way.
Did I misinterpreted this in some way?

Share on Facebook Share on Twitter


kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "TempSensor mcModule"
« Reply #1 on: June 07, 2016, 01:59:48 am »
From old forum:

I have now tried the code for Temperatur with the updated software:
mcStudio – 0.7-890
mcGateway – 0.6-355
mcModule – 0.7-356
But mcStudio gives me Running failed every time I try to debug the code

robvdv
I am having the same issue. McStudio gives “running failed” in debug mode for the example Temperature program. With setting several breakpoints I discovered that the program fails when the tempsensor function ends at the return line. McStudio than completely hangs. Debugging can't be stopped or aborted. The only way to stop is to close McStudio. Software used is the same as above.

kristofferis
Thanks for reporting in, always good to know that more have the same issue so that's a general issue and not user based.

mc-abe
We have tracked this issue to a bug in mcStudio code generation. It has been resolved and there is a new mcStudio version available. V0.7-891 has resolved this issue.

kristofferis
Perfect, thanks.

M

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Re-Post "TempSensor mcModule"
« Reply #2 on: June 08, 2016, 02:19:35 pm »
DA ,
I have another question.
I used the Example ''Temperature'' project.

there it says,
If TempC > 25.0 Then
            LedRed = True
        Else
            LedRed = False
        End If

the roblem is , the red light remains On. I am sure temp of my place is not above 25DegC .
can it be that the coversion of temo sensor has been wornlgy implemented?

next queston ; where is the actual sensor?
regards,
M

kristofferis

  • Sr. Member
  • ****
  • Posts: 287
  • Location: Sweden
    • View Profile
Re: Re-Post "TempSensor mcModule"
« Reply #3 on: June 08, 2016, 02:27:18 pm »
Hello.

Just to verify the temperatur could you please set a breakpoint after
Code: [Select]
Dim TempC As Float = TempSensor.GetTempAnd run the code then on the right side of mcStudio you will see what value that TempC has.

Like Like x 1 View List

mc-Josh

  • Global Moderator
  • Newbie
  • *****
  • Posts: 27
    • View Profile
Re: Re-Post "TempSensor mcModule"
« Reply #4 on: June 08, 2016, 03:13:56 pm »
@M, the temperature sensor is located as shown in the attached picture.


« Last Edit: January 18, 2017, 09:02:35 am by mc-T2 »
Like Like x 1 Informative Informative x 2 View List