LCD Displaying system temperature    LCD Displaying torrent status

I previously had posted on how to communicate with an Arduino and display messages on an LCD using python. And I’ve been working on Raspberry Pi as well, setting it as a torrent box.

So I thought of hooking up these two together so that the LCD can display the torrent status. I also added two buttons so that I can scroll through the list of torrents. The Arduino is connected to the RPi via the USB, and the Arduino is powered by an external AV adapter. Initially I thought this will be unsafe, but apparently it is safe to do so (http://arduino.cc/forum/index.php/topic,22132.0.html, http://aeroquad.com/archive/index.php/t-1911.html?s=5273633e6fd3970524bf4473996b9f7d) The LCD also displays the current system temperature.

The source code the the python program and the Arduino can be accessed at: https://github.com/slayerjay/RaspberryPi_Arduino

Other Resources:

http://www.hobbytronics.co.uk/raspberry-pi-serial-port

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=32&t=6832

http://raspberrypi.stackexchange.com/questions/357/how-do-i-monitor-and-or-control-the-temperature-of-the-soc

So you may have your RPi  set up as a torrent box, or a web-server  or you may want to login to it remotely out of your home network, and your ISP will be giving you a dynamic IP. This is where Dynamic DNS (DDNS) comes to the rescue. I used noip.com as my DDNS provider (which is free), but you are can use any other similar service.

The Theory

Your home network’s public IP changes time to time because it is assigned dynamically by your ISP. A DDNS service points to your public IP, and changes its records about your public IP whenever it changes. You will have to download and run a small client program that will report you IP to the DDNS service when it changes. So whenever someone accesses your domain address he/she will be pointed to your IP.

Setting Up

The different services that you are running on the RPi will be listening on different ports. The web server by default would be listening on port 80, and transmission torrent service will be listening on port 9091 (by default). You need to tell your router that any incoming packets that are coming for a specific port, (say port 80) should be forwarded to your RPi.Now the exact way to set up port forwarding depends on your router, but it is pretty straightforward if you know the above theory behind port forwarding. You can get some help from portforward.comIf port forwarding is set up you can check it using port scanner. And you will be able to access your service by your public IP.

  • Register with your DDNS provider, get a domain name, and download their client program.

I registered with noip.com and downloaded their Linux client software, and installed it (where you will have to enter your noip.com credentials)

  • Set the client program to run at startup of RPi

The following post explains how to set the noip2 client to run at startup: http://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html

If all works well, you will be able to access the services on your RPi from anywhere!