Raspberry Pi

Leapcast – Chromecast for Raspberrypi

Leapcast is a software implementation of the Chromecast. It works on the same protocol that Chromecast does and can be easily used as a Chromecast device. What is interesting is that the cost of a Chromecast device and a Raspberry Pi is the same($35).

To use your Raspberry Pi as a Chromecast device follow the following steps:

1. Upgrade your Raspberry Pi

sudo apt-get update
sudo apt-get upgrade

2. Install Chromium  browser

sudo apt-get install chromium

3. Now we will install dependencies for leapcast and clone the git repository

git clone https://github.com/dz0ny/leapcast.git
cd ./leapcast
sudo apt-get install virtualenvwrapper python-pip python-twisted-web python2.7-dev

Now reset your ssh connection by typing exit and then again ssh into your Pi.

4.Now you are ready to run leapcast. Make sure your HDMI cable is connected.After that type

cd leapcast/
startx &
mkvirtualenv leapcast
pip install .
DISPLAY=:0 leapcast --chrome /usr/bin/chromium

If you get the error “failed to load nss libraries” then type

sudo ln -s /usr/lib/arm-linux-gnueabihf/nss/ /usr/lib/nss

With this i could stream youtube videos to my Pi but I have not tried the new screen cast feature yet. If you try it and it works please leave a comment.

 

 

Installing tinyos on Raspberry Pi

The Raspberry Pi is a credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation. It makes programming the motes easy because it can be connected directly to the motes and the motes can be programmed without having to install tinyos or nesc and other tools for programming. This would help a lot of people to use the same tinyos installation without screwing with their operating system.

For this tutorial I am using a RASPBIAN-Debian Wheezy and you can download it from here.

After you burn your image and boot your raspberrypi for the first time don’t forget to run a sudo raspi-config and expand your root partition to fill the SD Card.

First we will install all the essentials required to compile nesC. To do this run the following command :

1. sudo apt-get update

2. sudo apt-get install emacs gperf bison flex git

After the above files are installed reboot your raspberrypi with sudo reboot -h now

Next we will clone the git repository from this link.  Type

git clone https://github.com/tinyos/nesc.git

cd nesc/

./Bootstrap

./configure

make

sudo make install

Next we will install the essentials for tinyos.

sudo apt-get install build-essential openjdk-6-jdk openjdk-6-jre python2.7 python2.7-dev automake avarice avr-libc msp430-libc avrdude binutils-avr binutils-msp430 gcc-avr gcc-msp430 gdb-avr subversion graphviz python-docutils checkinstall

After this is done go back to your home folder and type git clone https://github.com/tinyos/tinyos-main.git 

Now type sudo nano .bashrc and add the following lines to the end of the file

export TOSROOT=”/home/pi/tinyos-main-master”
export TOSDIR=”$TOSROOT/tos”
export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
export MAKERULES=”$TOSROOT/support/make/Makerules”
export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python

echo “setting up TinyOS on source path $TOSROOT”

Almost done.

Now type source .bashrc

Now navigate to ~/tinyos-main-master/tools and execute the following commands

./Bootstrap

./configure

make

sudo make install

You’re done! 😀

Check your TinyOS install by:

cd ~/tinyos-main-master/apps/Blink

make telosb

The code should compile successfully and at the end of the compilation, the result would be similar to that of writing a tos-image.

Cheers!