O'Reilly logo

Getting Started with the Internet of Things by Cuno Pfister

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ParallelBlinker

ParallelBlinker is a complete example with one actor called blinker that periodically blinks the onboard LED, and another called webServer that handles HTTP requests. Once running, both actors, shown in Figure 13-2, communicate only through the buffer variable. It is the boundary between the two actors.

Architecture of ParallelBlinker

Figure 13-2. Architecture of ParallelBlinker

The complete program is given in Example 13-5.

Example 13-5. ParallelBlinker

using System.Threading; using Gsiot.Server; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware.NetduinoPlus; public class ParallelBlinker { public static void Main() { var buffer = new Buffer { }; var blinker ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required