Netduino is an impressive hardware platform that runs applications built with.NET MicroFramework, which is quite easy for C# and.NET enthusiasts to build IoT things.
In this project, a UWP controlled wireless Netduino car is designed based on Netduino 3 WiFi. First of all, Netduino is controlled by a UWP application that running on phone, PC, or IoT device through WiFi WLAN. As soon as signals are received by the Netduino 3, they will be processed and forward to the driver board. Thirdly, the four wheels of the car are controlled by the driver board, which support forward, back, left, right, follow line and manual operations. So, this project consists of two designs: an UWP application that running on phone, PC or IoT device, and the Netduino WiFi based car. The system architecture is shown in Figure 1 as follows.
The demo video is uploaded to YouTube as follows.
Project InstructionsStep 1: Connect the Netduino 3 WiFi to the CarTime: 30 minutes
Parts: Netduino 3 WiFi, USB cable, Car
In this project, we use the Arduino Car that produced by a Chinese company, which is available on taobao. After assembling the driver board, the four wheels and motors, we should pay attention to the connection between Netduino 3 WiFi and the Arduino Car. In this project, serial port communication is used between Netduino 3 WiFi and the Arduino Car. And we should connect the Rx0(Pin 0) of Netduino 3 WiFi to the Tx of Arduino Car, while Tx0(Pin 1) of Netduino 3 WiFi to the Rx of Arduino Car. Furthermore, we can use USB to Microso USB cable to connect the 5V power to the Netduino 3 WiFi. It is presented as follows in Figure 2.
Time: 10 minutes
Parts: Arduino Car, PC, Arduino IDE
Power the Arduino, get the board connected to the PC, open Arduino IDE on PC. Open the ArduinoCar.ino (you can find it here: https://github.com/shijiong/UWP-Controlled-Wireless-Netduino-Car ). Choose Arduino/Genuino Uno and the right COM port, Click upload button to program the Arduino board.
Step 3: Install Netduino 3 WiFi-Related IDE and ToolsTime: 30 minutes
Parts: Netduino 3 WiFi, PC, Visual Studio 2015, NETMF SDK
In this section, we will install Visual Studio 2015 (Community edition is enough), NETMF SDK, and Netduino SDK. Please refer to this official docs here: http://developer.wildernesslabs.co/Netduino/Getting_Started/
Step 4: Configure and Update Firmware for Netduino 3 WiFiTime: 10 minutes
Parts: Netduino 3 WiFi, PC, Visual Studio 2015, MF Deploy
In this section, we shall update the firmware of Netduino 3 WiFi to the latest, as well as config the network for the on-board CC3100 Chipset.
For the first part, we can refer to this doc: http://developer.wildernesslabs.co/Netduino/About/Updating_Firmware/
For the second part, we can refer to this doc: http://developer.wildernesslabs.co/Netduino/Input_Output/Network/
For my project, I config it as follows. I use WPAPSK encryption, and the password is located in Pass phrase, the SSID is also set properly.
Time: 10 minutes
Parts: Netduino 3 WiFi, PC, Visual Studio 2015
As soon as we set the network, the Netduino 3 WiFi board should be unplug and replug to the PC. Then, we can use visual studio 2015 to open the project Netduino Car Server (you can find it here: https://github.com/shijiong/UWP-Controlled-Wireless-Netduino-Car/tree/master/NetduinoCarServer). Click on the Properties item in the Solution Explorer, select.NET Micro Framework on the left, and the under Deployment choose USB, and in the Device drop down, choose your Netduino device as shown in figure 4.
After downloading the program, you will find the IP address that Netduino 3 WiFi gets via DHCP service, which will be shown in Output Window as follows.
Time: 10 minutes
Parts: Netduino 3 WiFi, PC or IoT device, Visual Studio 2015 or Visual Studio 2017
In this section, we will debug Netduino Car Client UWP application on Windows 10 device, including PC, Mobile or Windows 10 IoT Core device(Raspberry Pi, Dragon Board, Minnow Board MAX). The sample project is build under Windows 10 Build 10240. So, if you want to switch the target to different Build, you can change this setting in project properties page as follows.
If you want to deploy this app to the local PC, choose local machine, and click debug button as follows.
Alternatively, we can deploy the UWP App to Windows 10 IoT Core devices, such as Raspberry Pi, Dragon Board, or Minnow Board MAX. For Raspberry Pi, we should choose ARM instead of x86 or x64, set the IP address of the Raspberry Pi, then click Debug button to trig download the app as follows.
Please connect touch display (or display and mouse/keyboard) to your IoT Device in order to input strings and click buttons on the UI.
As soon as the UWP application starts up, you will find the UI is shown as follows.
Here we input the IP address of the Netduino 3 WiFi, which is shown in the step 5, click connect button to establish socket communication between the UWP app and the Netduino. Please note that we use 8080 port for socket communication. After connection, we can click go, back, left, right, stop, followLine, and Manual button (or you can use WSAD keys on keyboard) to control the car. Please remember that the Windows 10 Device and the Netduino should be connected to the same local network.
SummaryIn this tutorial, we have walked through the hardware and software that we need to make a UWP controlled wireless Netduino car.
Further WorkAdd speed and servo control to the project in the near future.
Comments