Hi All, trying to get the following working, I have a moisture module on socket 4:
using GT = GHIElectronics.UAP.Gadgeteer;
using GTM = GHIElectronics.UAP.Gadgeteer.Modules;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
/// An empty page that can be used on its own or navigated to within a Frame.
public sealed partial class MainPage : Page
private GTM.FEZCream mainboard;
private GTM.Moisture moisture;
private DispatcherTimer timer;
private async void Setup()
this.mainboard = await GT.Module.CreateAsync<GTM.FEZCream>();
this.moisture = await GT.Module.CreateAsync<GTM.Moisture>(this.mainboard.GetProvidedSocket(4));
private void ProgramStarted()
this.timer = new DispatcherTimer();
this.timer.Interval = TimeSpan.FromMinutes(1);
this.timer.Tick += Timer_Tick;
private void Timer_Tick(object sender, object e)
double reading = moisture.GetReading();
I am using pretty much identical startup code, and it’s working, but I have a source snapshot from a month ago. Maybe they changed something. If I get a chance, I’ll do another pull and see if anything changed.
@ mcalsyn - It may go deeper than I thought, the attached screenshot is from Module.cs in the Gadgeteer.Core project, seems like there’s some kind of core reference missing, I’m getting things like System.Object and System.Void being undefined. What’s missing that even System can’t be referenced?
Exit and restart VS - the system.void indication can be a false indication from VS (I just saw this myself). If you do a build and don’t see those messages in the build output (not the errors window - the actual compiler output), then it’s VS that is confused.
Also, make sure you have added a reference to the IOT extension assembly (under Extensions in Add References window)
It appears the highest reading for the Moisture sensor is a double at roughly 0.37, Should I just calibrate for that being full moisture, or should I have expected to get similar return values as to when I was using the sensor with a Cerberus Gadgeteer project?