In Chapter 3, Intel Edison and IoT (Home Automation), we looked at using a WPF application and MQTT connection, learning that we could control our Intel Edison using MQTT protocol. However, here, we'll be dealing with serial port communication. Since we have already discussed WPF applications and how to create projects, and created an hello world application, we won't discuss the basics in this chapter, and will instead get into the application directly. Our problem statement in this chapter is to switch an LED on and off using a WPF application via serial port communication.
Start with creating a new WPF project and name it RobotController:
Next, in MainWindow.xaml, we'll design the UI. We'll use the following controls:
- Buttons
- TextBox
- TextBlocks
Design your UI as follows:
The xaml code for the preceding...