Sample node.js server running Windows 10 IoT Core manipulating pins on a Raspberry Pi 2 with Universal Windows Platform
This code will let you input a GPIO Pin number as a parameter to toggle it on and off. Helps with testing pins and just an easy way to get started understanding manipulating pins for creating internet of things projects.
View on GitHub Download .zip Download .tar.gz
- Raspberry Pi 2 Configuration:
- Install Visual Studio from the following link:
- http://bit.ly/VSCOMMML
- Choose custom installation and select the options below (if you already have Visual Studio installed then use "uninstall or change a program" in the control panel to modify Visual Studio and make sure the items below are checked):
- Check Universal Windows App Development Tools
- Check Cross Platform Mobile Development
- Check Common Tools
- Install python 2.7(only 2.7 works, 3 does not work yet)
- Download and install the Node.js Tools for UWP Apps
- https://github.com/ms-iot/ntvsiot/releases
- Start Visual Studio
- Create a new Project
- Select Javascript -> Node.js -> Blank Node.js Web Server (Universal Windows)
- Choose npm -> Install New npm Packages
- install local express npm package
- Select Project -> Properties
- Put in remote machine ip address or machine name for your raspberry pi - save the file
- Get files from GitHub
- git clone https://github.com/jennparise/win10iot-nodejsserver-sample.git
- Copy the server.js file from the files you just downloaded and replace the server.js in the Visual Studio Project
- Choose to run "Remote Machine" with Debug Arm selected
- A pop up may appear warning about developer mode
- select the link for the developer mode settings and enable developer mode
- Choose to run "Remote Machine" with Debug Arm selected again (this may not be necessary, it may continue to run after you make the change)
At this point you can use Postman to test the server.
Or use the cordova/ionic project located here in my github
Comments