Windows 10 IoT - sample program error

Hi -
I’m just getting started with GrovePi. I followed all the setup instructions (including updating GrovePi references with NuGet in my project, and connecting the two sensors correctly), but when I ran the sample program buttonbuzzer at this line:

IButtonSensor button = DeviceFactory.Build.ButtonSensor(Pin.DigitalPin2);

gets the following error:

System.TypeLoadException occurred
HResult=0x80131522
Message=Could not find Windows Runtime type ‘Windows.Devices.I2c.I2cConnectionSettings’.
Source=
StackTrace:
at GrovePi.DeviceBuilder.BuildGrovePiImpl(Int32 address)
at GrovePi.DeviceBuilder.DoBuild[TSensor](Func`2 factory)
at GrovePi.DeviceBuilder.ButtonSensor(Pin pin)
at ButtonBuzzer.StartupTask.Run(IBackgroundTaskInstance taskInstance) in C:\mytests\Button_Buzzer\StartupTask.cs:line 56

What do I need to do fix this? Thanks!

Just want to check:

  1. Are you running this tutorial?

  2. Do any of the other samples work?
    Thanks!

Hi -
I followed the tutorial exactly, and when I run it, I get the following 1
error and the 4 warnings. (Naturally, it’s the error I’m more worried
about.) This happens with both HelloWorldBlinky and ButtonBuzzer. (I get
the same error both times.)
Thanks for your help in getting this to work!

Severity Code Description Project File Line Suppression State
Error DEP6720: Failed to deploy package ‘Core CLR’
(E0999A8F-0200-4738-AE1E-B45742BE6B6B). Package is not defined for OneCore.
HelloWorldBlinky
Severity Code Description Project File Line Suppression State
Warning Certificate file ‘HelloWorldBlinky_TemporaryKey.pfx’ not found.
HelloWorldBlinky
Severity Code Description Project File Line Suppression State
Warning The certificate specified is not valid for signing. For more
information about valid certificates, see
http://go.microsoft.com/fwlink/?LinkID=241478. HelloWorldBlinky
Severity Code Description Project File Line Suppression State
Warning CS1998 This async method lacks ‘await’ operators and will run
synchronously. Consider using the ‘await’ operator to await non-blocking
API calls, or ‘await Task.Run(…)’ to do CPU-bound work on a background
thread. HelloWorldBlinky
C:\Users\Administrator\Desktop\GrovePi-master\Software\CSharp\Samples\HelloWorldBlinky\HelloWorldBlinky\StartupTask.cs
58 Active
Severity Code Description Project File Line Suppression State
Warning CS0168 The variable ‘ex’ is declared but never used HelloWorldBlinky
C:\Users\Administrator\Desktop\GrovePi-master\Software\CSharp\Samples\HelloWorldBlinky\HelloWorldBlinky\StartupTask.cs
72 Active

After failing in running any of the Windows IoT apps, I set up Raspian for
Robots, in the hope of getting something working. I seem to be having some
i2c problem, but I’m not sure what else. (i2cdetect doesn’t detect
anything). I’ve updated the firmware and done everything else I could think
of, and I can’t get grove_led_blink.py to work, or anything else. (I’ve
been at this for hours.) Here is my log.txt from alltest.sh. Please
help! I’m really trying to get this to work!

Check space left

Hey @smamber, I can’t see anything attached. Just upgraded your permissions in case that was the issue. Can you try one more time?

Let’s start by trying to make sure i2cdetect works. If you can send along your test log, that would help immensely!

Thanks for trying to help, John. I did give you the test.log - pasted in,
rather than attached. It’s the whole thing. I hope it tells you something

  • I see there are i2c problems there and also maybe firmware issues. I’ve
    updated everything (including firmware) but I will try again.

Dear John,
IT’S ALL WORKING NOW!! Thanks for your help. I think it was the
permissions thing you fixed, because went I just went to try again,
everything was finally fine. I’m so happy!!

Ok, great, glad this is solved! Please come on back if you have any other problems!

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.