This is just a note to thyself about a fantastic project I stumbled upon by chance today.




This project allows the user to build nice and user-friendly dashboards easily. I'll be using it soon for a couple of projects I have in mind.

DS1307 RTC chip from Adafruit

RaspberryPi is a great budget computer. To keep the cost of the unit down, there is no real time clock. This is usually taken care of by the software: the operating system gets the accurate date-time automatically from one of the time servers.
When a RaspberryPi is kept offline but accurate time keeping is needed, an RTC is required. I needed one for Theodora's music box, as I wanted it to play a Happy Birthday tune on her birthday. To do this, I added an RTC module from Adafruit.

I got this unit from Oomlout.co.uk. It's a simple kit, which only takes a few minutes to solder together. Read the adafruit instructions carefully. Note that the resistors are not required for the RPi.

Using the unit in linux is surprisingly straight forward. You can basically read and write the time to this unit from the command line.

The battery should last for at least 10 years!


Theodora’s Music Box

This is a short video of a project I completed last month: a music box for my goddaughter.

This music box was put together using a Lego storage box, a raspberrypi B+ and a speaker, along with a few MP3s of original music box sounds and lullabies.

Python and a few bash scripts took care of the software side of things.

I’ll add some code at a later stage.

Simple File Rename script in Python

import os
indir = 'c:\\datafilepath\\'

for filename in os.listdir(indir):
	if filename.startswith("xyz_"):
		newname = filename.replace("xyz_","abc_")
			os.rename(indir + filename, indir + newname)
			print "[NEW]", filename, "-->", newname
			print "[OLD]", filename, "-->", newname

Robot Challenge 009

Not much progress to report. My compass module seems to have died, probably due to the fact I was feeding it 5V instead of the required 3.3V… Never mind, new module ordered.

I’ve added a new level to the robot and now looks neater. Here are a couple of photos:

With a camera (placeholder – not really attached):

Without camera:

Raspberry Pi Samba Share

My RPi is the brain of my ARK-AV-01 robot. As I currently am in the programming phase, I found myself programming it from the command line. I wanted something easier, with no login/password, so I activated samba with the following samba.conf file:

workgroup = mygroup
interfaces = wlan
bind interfaces only = yes
server string = Arkadian's ARK-AV-01
security = share
guest account = nobody
log file = /var/log/samba.%m

comment = Robot Control Center
path = /robot/
available = yes
browseable = yes
public = yes
writable = yes
read only = no
guest ok = yes

The above configuration allows you to connect to the /robot/ folder from any windows or linux machine.

I had to also run the following commands

sudo chown nobody /robot


sudo chmod 777 /robot -R

to ensure the folder is owned by user nobody and is writable.

then, just restart the samba service:

sudo service samba restart

And now you can mount the folder /robot to your windows or linux machine!
if everything works ok, make sure to add samba to the startup script:

sudo update-rc.d samba defaults