C:\Node.js (ChakraCore)folder on your Raspberry Pi 2 or 3.
C:\Node.js (ChakraCore)on your Raspberry Pi 2 or 3.
Create new folder called “CylonSample” on your PC. Open the folder and create a new file called cylonsample.js and place the contents below to it.
npm install cylon cylon-firmata cylon-gpio cylon-i2c --target_arch=arm
Open up an explorer window on your PC and enter \\<IP address of your device>\C$ to access files on your device. The credentials (if you have not changed them) are:
username: <IP address or device name, default is minwinpc>\Administrator
Copy the CylonSample folder on your PC to C:\CylonSample on the Raspberry Pi 2 or 3.
Connect your Arduino and Raspberry Pi 2 or 3 with the USB cable. When you do, if your Raspberry Pi 2 or 3 is connected to a monitor, you should see the device getting recognized like in the image below:
We also need to assign a port name to (e.g. ‘COM5’) to the Arduino. Follow these steps to do this:
In PowerShell connected to the Raspberry Pi 2 or 3, run
devcon status usb*. When you do this, you should see a device similar to the one below:
Name: USB Serial Device
Driver is running.
reg add "HKLM\SYSTEM\ControlSet001\Enum\usb\VID_2341&PID_8036\5&3753427A&0&4\Device Parameters" /v "PortName" /t REG_SZ /d "COM5" /f.
shutdown /r /t 0to reboot the device.
In PowerShell, run the command
& 'C:\Node.js (ChakraCore)\Node.exe' C:\CylonSample\cylonsample.js.
After running the command, the LED (shown with the arrow in the picture below) on the Arduino should start blinking every 1 second.
Your session has expired. Please sign-in again to continue. Unfortunately any unsaved changes will be lost.