achter.be

photography, coffee, technology and more

Banggood: ATmega328P Arduino Nano V3

ATmega328P Arduino Compatible Nano V3

This worked at the moment of writing, I can’t guarantee it will work for future versions of the boards nor OS X

For those just wanting the tutorial, go here

I while ago I discovered the chinese website Banggood, which has almost everything you want at low prices. Which is very good for my new arduino hobby.

So next to some other components I ordered the ATmega328P Arduino Compatible Nano V3 5-pack which means I got 5 Arduino nano clones for 15 euro + free shipping, which is just a steal. I have to be honest I was a bit scared to order them, because of all the mixed reviews on the net. On the other hand the max I would loose is 15 euro.

I knew however before ordering that the USB chipset was probably going to require some extra attention.

So once I received the order yesterday, I immediately tried the solutions offered in the comments on Banggood, but I did not manage to get it working. So I turned to google for the rescue. There were several other solutions, but none worked as it should. However the one that got it all working for me was the tutorial of kiguino.

I’m saying nothing new here, but just because it took me some time on google, I’m reblogging it here, for future reference and maybe help somebody else.

Tutorial for install on Mac OS X Yosmite (latest test 10.10.3)

  1. Download the driver at the developers website (!! Only the driver from december 2013, works with 10.10)
  2. Unzip and install by right clicking and selecting open.
  3. Do NOT restart yet
  4. Open terminal and paste sudo nvram boot-args="kext-dev-mode=1"
  5. Reboot
  6. The driver should be installed, on my arduino’s it installed as /dev/cu.usbserialmodem1410 or /dev/cu.usbserialmodem1420 depending on the port it was connected to and the device I was using.

Terminal: Git commands cheat sheet

To start a repository from the command line:

git init
git add .
git commit -m "initial import"

When files are added to .gitignore and are not removed, use following commands and commit.

git rm -r --cached .
git add .
git commit -m "fixed untracked files"

Openhab install on Raspberry Pi

Openhab logo

This post is my guide for installing and configuring Openhab on the Raspberry Pi.

Install openhab

  1. Upgrade and update apt-get sudo apt-get update && sudo apt-get upgrade

  2. do a update of the firmware. These are 2 steps you should always do before installing something new. sudo rpi-update

  3. make directory and download and unzip openhab (get link from Openhab/downloads). Replace x.x.x in the command below with the version number you copied. sudo mkdir /opt/openhab && cd /opt/openhab/ && sudo wget "get download link" && sudo unzip distribution-x.x.x-runtime.zip && sudo rm distribution-x.x.x-runtime.zip

  4. Download and install bindings for openhab. This installs all possible addons available. Replace x.x.x in the command below with the version number you copied. cd addons && sudo wget "downloadlink addons" && sudo unzip distribution-x.x.x-addons.zip && sudo rm distribution-x.x.x.-addons.zip

  5. copy the config file and make the startup script executable cd .. && sudo cp configurations/openhab_default.cfg configurations/openhab.cfg && sudo chmod +x start.sh

  6. Edit the config file and start the server. sudo vi openhab.cfg sudo ./opt/openhab/start.sh

Raspberry Pi scrapbook

I’m trying to setup a sort of internet of things sensor network at home.

For this project I’m using raspberry pi and Arduino boards.

As I already had to start over, I’m going to use this post as a scrapbook:

Pi setup:

  1. install Noobs on Raspberry Pi
  2. Select Raspbian as OS
  3. apt-get:
    • tightvncserver
    • upstart
  4. reboot
  5. this probably gives a weird Login screen, ssh to Pi and chown pi:pi .Xauthority in home dir.
  6. reboot again
  7. apt-get:
    • arduino
    • python-pip
  8. install adafruit webide
  9. install pyserial:
    • by downloading latest version (atm 2.7) in tar.gz ->
    • untar -> install with sudo python setup.py install
  10. Make startup script for scripts:
    • doorbell.py

Startup scripts:

  • cd /etc/init
  • nano scriptname.conf
  • copy/paste this code and fill in

    # Program_explanation
    
    
    description "Your_description"
    author "User"
    
    
    start on runlevel [2345]
    stop on runlevel [016]
    chdir path_to_dir_with_script
    exec python path_to_script.py
    respawn
    
  • start script with sudo service scriptname start, it starts every reboot and when it quits it respawns.

[review] Backblaze, cloud backup

Backblaze

Since I started using computers, I have had a mixed relation with backups. They are too much hassle to deal with, they fail, I didn’t have enough space. But since the internet connections are able to handle all data I produce now, I decided to start using cloud backup. I’v chosen Backblaze cloud backup.

I had and still have a fully installed and running local backup system. But it took me a while to figure out an easy way to have a offsite backup for my photography. The problem is that having an off site backup used to be a lot of work, I tried several ways, but never found a way that worked reliably and wasn’t a lot of work.

The only easy way, was and still is by uploading everything, but the problem in Belgium was that there were up and download limits set by the providers. Even today on the “unlimited” packages there still is a kind of restriction, it is around 500 gb to 1TB a month depending on the area you live in.

Why Backblaze?

After extensively researching the different solutions, I decide to go with Backblaze, because of the following reasons:

  • Backup external drives
  • Throttle upload speed of your data when needed
  • Ship backup drives worldwide
  • Only 4$ a month if you choose the 2 year plan
  • Unlimited backup space

As far as I found, there are no other services that offer all these options for that money.

How does it work?

It works great, after subscribing and paying with your credit card, you download and install the program for your OS. Backblaze will start to upload data from your internal drives. If you want to add more drives, just select it in the preferences pane. If you have upload limits, you can choose to throttle the speed and Blackblaze gives you an estimate how much it will upload during a day.

A few figures to give you an idea:

  • 1.2 TB data backed up
  • Initial backup took 3.5 months
  • Restored main OS X data once
  • Restored 35 GB in a zip-file

Is it good?

Although it took almost 4 months of backing up, it was no hassle, Backblaze just worked. Restoring was just a matter of selecting the files I wanted, waiting for the zip to be generated and then downloading it.

But it’s not all good, the restore process sucks. You’ll get all your files back, but it’s up to you to put them all back where they belong. That’s no fun, let me tell you. You have to deal with permissions, finding the correct folder and so on. Another annoyance, is the fact that after the restore, my secondary internal drive was no longer recognized as being the same drive, so it had to be backed up again, like the replaced primary drive. Why?

Conclusion?

Backblaze is a great solution for an off site backup, but it takes a while to get all your data backed up, my suggestion let me send you guys a drive with my data for an extra cost, like crashplan does. When you have to restore, it’s all manual labour. I would suggest that they implement some sort of restore program that does most of the work for you.

Despite the remarks I have, I’m a satisfied Backblaze cloud backup user and would recommend it to everybody

I wasn’t forced to write this blogpost, everything in here is my own view, the content wasn’t reviewed by any departement of the brands mentioned in here