|
-
May 23rd, 2015, 06:10 PM
#19
Re: Windows 10 IoT on Raspberry Pi 2
So, I tried to do the same on the Windows IoT
I modified the Blinky sample: https://ms-iot.github.io/content/win...les/Blinky.htm
I commented out the lines that changes the color of the circle in the interface, and the code left was only to flip the pin on/off.
At first I tried with the timer, I changed it from 500 ms to 1 ms, and the pin flipped every ~32 ms, so it seems the timer is the same as on the main computer timer (minimum 32 milliseconds)
Then I commented out the timer code, and added in the MainPage() a loop to flip the LED (pin... I did not connect any LED, I connected it to my logic analyzer).
Code:
public MainPage()
{
InitializeComponent();
//timer = new DispatcherTimer();
//timer.Interval = TimeSpan.FromMilliseconds(1);
//timer.Tick += Timer_Tick;
//timer.Start();
Unloaded += MainPage_Unloaded;
InitGPIO();
while (true)
{
FlipLED();
}
}
This way it should flip at it's fastest speed. And as predictable it is MUCH slower running on the Windows IoT, in fact it is more than 1000 times slower! LOL
It was writing to the pin between 100 microseconds to 200 microseconds, the logic analyzer was giving frequencies between 3.5 KHz to 4.9 KHz, the timing varies A LOT!!
So, Windows 10 IoT... quite a disappointment compared to C on the Raspbian (Linux)
Last edited by CVMichael; May 23rd, 2015 at 07:19 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|