Category

Computers

Bitsevent 2014

By | Computers, Events | No Comments

I went yesterday to bitsevent. The main theme was retrogames but there was also a space for tech.

I met there Roman Nuez with his Funlab project, Jordi Martín with his makers&bits and Oriol from Stalactite3d.

That was just for chatting and getting up to date on their projects.

Bitsevent

I enjoyed the retro area. Meeting again with my Commodore 64 was just reminding me my teens, lots of time spent typing Basic code from magazines, and how I later switched to Assembler.

That was an amazing experience. The first time I filled a screen with ‘A’ it was stuning. I couldn’t tell how fast it was, used to Basic.

Commodore 64

It’s not exactly like mine, I remember keys on darker grey.

Another interesting encounter was the ZX80 and the ZX81 from Sinclair.

ZX80ZX81

 

I bought a couple of geek t-shirts and left the space because I am not into gaming anymore.

 

 

Pong

Starting wth Python

By | Computers | No Comments

After few weeks more quiet, I couldn’t resist to engage in some MOOC (MOOC are open online courses, free, from famous universities. They cover any kind of topics).

I already learned some Ruby on Rails last year but Python is all over the place, especially in the Maker scene, so let’s go for Python!

I started a couple of courses:
In Udacity: Intro to Computer Science
In Coursera: An Introduction to Interactive Programming in Python

Udacity course is really too simple, if you know already the programming concepts, it progresses slowly, so in the end I lost interest. But for someone that wants to start from scratch I recommend it!

Coursera course, although it pretends also to be an intro, moves fast into nice stuff. Mini-projects are funny.
The first one is Rock-paper-scissor-lizard-spok for example!

And the last one I did was Pong.

Pong

I’ll have to think what to do afterwards with the Raspberry 😉

There is only one thing i don’t like from  Coursera. It’s the evaluation model, first by peers and then sefl-evaluation. For programming exercises you could make an automatic evaluation (it was liek thsi for the SaaS courses I took in Edx). For other subjective type topics I understand this methodology. But you end up with a lot of deadlines to control: to snd you rmini-project, to evaluate your peers, to self-evaluate, uf! I missed already some deadlines for the first submission, so I go on my on now.

Raspberry Pi

Raspberry Pi & BitTorrentSync for dummies like me

By | Computers, Platform | No Comments

I finally found time to do something worth with my Raspberry Pi.

I had already installed BitTorrentSync in  a couple of computers. BitTorrentSync allows you to synchronize folders between all your devices like Dropbox, but the data are not stored in the cloud. If you have concerns about privacy, this is the definite tool.

But be aware, unless you synchronize with a remote PC you are fully exposed to data loss due to a fire at home.

The great thing about Raspberry is that power consumption is low to be able to have it always on, so all your devices can synchronize immediately with your Raspberry HDD. You don’t have to wait anymore for the two PCs to be on at the same time, for example.

Raspberry Pi

Well, let’s do a step by step walkthrough over the process I used to install it, for dummies like me.

First the sources. I took all knowledge from the following articles where more details can be found, though not repeating again:

First,

How to add the HDD

Generally Raspberry autodetects HDDs. For better performance it is recommended to format the disc to EXT4.

First find how your disk appears with this command

df -h

It is usually /dev/sda1. With the mount command you can also retrieve the list of mounted units.

Now you will have to format the disk, replace “sda1” by yours:

sudo mkfs.ext4 /dev/sda1 -L untitled

“untitled” is the disk label, in my case I don’t care. If you have problems when you run it try to first umount (check below).
If you have to mount the disk you will need to create a folder where to mount it. We will call it “mydisk” in the example.
sudo mkdir /mnt/mydisk

Then you can mount the disk
sudo mount /dev/sda1 /mnt/mydisk

And now you can use /mnt/mydisk as an additional drive. Create folders, copy files, etc.
If you have to shutdown the Raspberry it is recommended to unmount the unit

sudo umount /dev/sda1

If you have a NTFS disk and you don’t want to format it because you have data already, there is an option described in the first link of the list. But it makes sense to have a disk fully dedicated to the Raspberry, so format it in EXT4!

You will also want that the disk gets mounted in the folder every time you reboot, you can do it by registering it in /etc/fstab. Let’s edit it to add our unit.

sudo nano /etc/fstab

In our case we only have to add a line in the end (use tabs in between)
/dev/sda1 /mnt/mydisc ext4 defaults 0 0

If after this you apply sudo mount -a you will mount all the units referred in the file /etc/fstab.

Now we have a disk,

Let’s go for BitTorrentSync

To install it you need to download the ARM version with these commands

mkdir ~/.btsync && cd ~/.btsync
wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_arm.tar.gz
tar -xfv btsync_arm.tar.gz

And now you only need to run the app
cd ~/.btsync
sudo ./btsync # can be killed with `sudo killall btsync`

You should get a message BitTorrentSync forked and a pid. Everything ok.

And now you only need to add the folders to synchronize. Open your browser in the IP address of your Raspberry and port 8888.

IP_RASPBERRY:8888

You will see an option to synchronize folders. Choose anything you want within /mnt/mydisk
If you already have a secret form another computer, paste it here, if not just generate a secret and keep it. You will have to add it in the computer you want to synchronize with.
All set. You can create several folders and synchronize them, independently and in addition you can decide which devices synchronize with which folders. Up to you!

I missed one step, how to modify the config to have the program run at boot. There is an explanation in the fourth link.

I hope this has been useful, if not you always have the links I posted for more details.