forked from nanoframework/Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
34 lines (26 loc) · 924 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
using System.Diagnostics;
using System.Threading;
using GiantGecko = nanoFramework.Hardware.GiantGecko;
namespace ReadDeviceIDs
{
public class Program
{
public static void Main()
{
string uniqueDeviceId = "";
foreach(byte b in GiantGecko.Utilities.UniqueDeviceId)
{
uniqueDeviceId += b.ToString("X2");
}
Debug.WriteLine($"Unique device ID: {uniqueDeviceId}");
Debug.WriteLine($"Production revision: {GiantGecko.Utilities.ProductionRevision}");
Debug.WriteLine($"Device family: {GiantGecko.Utilities.DeviceFamily}");
Debug.WriteLine($"Device number: { GiantGecko.Utilities.DeviceNumber}");
Thread.Sleep(Timeout.Infinite);
}
}
}