mc-Things

mc-Products => mc-Module => Topic started by: mcThings on June 06, 2016, 11:01:43 am

Title: Re-Post "TempSensor mcModule"
Post by: mcThings 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?
Title: Re: Re-Post "TempSensor mcModule"
Post by: kristofferis 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.
Title: Re: Re-Post "TempSensor mcModule"
Post by: M 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
Title: Re: Re-Post "TempSensor mcModule"
Post by: kristofferis 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.

Title: Re: Re-Post "TempSensor mcModule"
Post by: mc-Josh on June 08, 2016, 03:13:56 pm
@M, the temperature sensor is located as shown in the attached picture.