【发布时间】:2016-12-30 15:34:26
【问题描述】:
我使用 Raspberry Pi 2 Model B 和 Windows 10 IOT Core 操作系统。
我使用了RFID RC522 Raspberry PI 2 Windows IOT提供的库
问题是当我将此代码放在 MainPage.xaml.cs 中时
var mfrc = new Mfrc522();
await mfrc.InitIO();
while (true)
{
if (mfrc.IsTagPresent())
{
var uid = mfrc.ReadUid();
mfrc.HaltTag();
}
}
visual studio 说 await 运算符只能在异步方法中使用。我不知道从哪里开始。我只需要 RFID 读取标签,然后在文本框中显示 RFID no/UID
【问题讨论】:
标签: c# iot rfid windows-10-iot-core