Introduction: Matchstick Emulator on Raspberry Pi 2
I saw many people are asking for a Matchstick emulator for their app development or any other reason.
Especially, the Matchstick team announced that they will delay their device shipping until sometime in August.
Today I would like to show you how to run Matchstick on your Raspberry Pi 2, so that you don't have wait for the dongle shipping delay. :)
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Prerequisite
I will assume that you have:
- Raspberry Pi or Pi2 with Raspbian installed
- Your Pi is connected to Internet via wired or wireless
- Prepared an Android phone to run sender app
- Eclipse + ADT is ready to build sender app code
In the following sections, we will:
- Install Node.js
- Install CoffeeScript
- Install firefox browser
- Install flingd
- Install Android camera sharing example on your Android phone
Step 2: Install Node.js
# curl -sL https://deb.nodesource.com/setup | sudo bash -
# sudo apt-get install -y build-essential python-dev python-rpi.gpio nodejs
# apt-get install -y build-essential python-dev python-rpi.gpio nodejs
# nodejs --versionv
# npm --version
Step 3: Install Coffee-Script
# npm install -g coffee-script
# coffee --version
CoffeeScript version 1.9.1
Step 4: Install Firefox Browser
# sudo apt-get install iceweasel
Step 5: Install Flingd
# git clone git://github.com/openflint/flingd-coffee.git
# cd flingd-coffee
# npm install
Specify firefox browser
# export RECEIVER_CONTAINER=firefox
Step 6: Run It
You have to start X window system first.
let's start it up
# export RECEIVER_CONTAINER="firefox"
# cd flingd-coffee/bin
You will see logs output and it tells you that it began to broadcast mDNS packets for device discovery.
It is waiting for sender app to connect it.
Step 7: Build and Run Android Camera Sharing Example Code
1. Follow the instruction to download and import the Android sender API to your Eclipse.
2. Clone and Import the sender app project into your Eclipse
# git clone https://github.com/openflint/android-webrtc-demo
Build and run it, and you got it!