Raspberry Pi 3 has been released for a while. The new RPi device added Bluetooth and Wi-Fi. More and more students and developers tend to study and work using Raspberry Pi, which supported by Windows and Linux. If flashing Windows 10 IoT core on Raspberry Pi, you can build IoT projects with Visual Studio 2015 and remotely debug your code. If you use Raspbian – the official supported Linux system, you can connect your keyboard, mouse, cable and display monitor to the board and directly write code on the small device. For the case that you want to switch work frequently between Windows and Raspbian, using the emulator QEMU may be a better choice.
Download and unzip the package qemu.zip, and then double-click run.bat to launch the emulator:
By default the username is pi, and the password is raspberry.
You can type ‘startx’ to launch a graphical session:
If you want to go back to command line mode, click the quit button and select Logout:
Python and GCC are pre-installed. You can write code in Python and C/C++ without any extra packages:
If you want to release the mouse from QEMU window, press Ctrl+Alt.
How to install Node.js for Raspberry Pi
In addition to C/C++ and Python, you can also write code using Node. Visit the download site. You will see there are three ARM versions:
To get the matched version, check the CPU information:
I downloaded ARMv6:
wget https://nodejs.org/dist/v4.3.1/node-v4.3.1-linux-armv6l.tar.xz tar –xf node-v4.3.1-linux-armv6l.tar.xz
Add the Node bin path to .bashrc:
vim ~/.bashrc export PATH=$PATH:/home/pi/node-v4.3.1-linux-armv6l/bin source ~/.bashrc
How to copy files from Windows to QEMU
Because the Raspbian OS is running in the emulator, we have to redirect the SSH connection port to make SSH service work. Edit run.bat to add:
-net nic -net user,hostfwd=tcp::22-:22
Run Putty to test the connection:
To copy files to Linux operating system from Windows, we can use PSCP. For example:
pscp.exe f:\hello.txt firstname.lastname@example.org:/home/pi