DropBox, Lindoe and rsnapshot

So I was trying to come up with a good way to backup my Linode box, now I have been thinking about this for a while, I put it on the back burner until quite recently when I finally got a DropBox (seriously if you don’t have one get one!) account. Now that I have one and have seen the potential I decide to see if I could use this to sync up backups to my desktop from the Linode server.

I used rsnapshot to do the daily backups into my DropBox folder. I only backup the htdocs, Apache configs, and an export of my databases since that is all I need to be able to restore or move my sites over. Now the only issue I have had with DropBox and Linux has been the issue of symlinks, it does not support them. So if you are backing up 100 megs of data the first day and then you backup again the next day and there are no changes. You still end up with another 100 megs. You can do the math its not ideal. But I figured since I don’t have much and its better then nothing I am going to stick with it. Now if you know what you are doing with rsnapshot you can secure copy them over SSH to another box. I plan on doing that next so that files are backed up to my local Linux box at home (even though just using Dropbox on that machine and a rsync would be enough).

Bellow are the steps to do what I have done. They are quick and a little light on details.

  1. Get a DropBox account.
  2. Setup the Linux client
  3. Install rsnapshot and set it up for the directories you want and point it to your Dropbox folder
  4. Done

Only side note is if you use this Dropbox for personal make sure you exclude it from your personal machine. That way you don’t end up with a gigs of backups syncing all the time.

SaprkFun Inventor’s Kit!!!!

So my wife got me a early birthday gift, well more like I bugged her to let me open it weeks early. It was the SparkFun Inventor’s Kit for Arduino with Retail case!

She as worried I would not like it since I have most the hardware in the kit, but I was pretty pumped, it has everything I need and the book. As of now I mainly just play and kind of understand electronics my end goal is to really understand it and I think this kit will help. Also its from SparkFun, so that’s a total win and as other will say never hurts to have more then one.

My wife is awesome.

Also image I snagged from the official website.

Arudino & reading the PORTB, PORTC, PORTD

The Arduino has a way to access the port registers (official documentation here), it allows lower-level and fast manipulation of the i/o pins on the micro-controller. This pertains to the ATmega8 and ATmega168. I did my testing with a Diecimila (ATmega168).

Now you may be wondering why I am making a post about this, well I ran into a interesting scenario while trying to use the registers to read if a pin was high or low. Now it is covered in the official documentation but I thought it would be nice to create a chart and elaborate on it some more.

When I was reading the output on digital pins 0-7 I had no issues, since I could define the ping with a variable and pass that variable to the bitRead() function and get what I needed. What happened is if I had a variables for say pin 8 and then passed that variable to the bitRead() and I would get nothing back.

Turns out what I did not know is this pings 0-7 map directly with the bits used to access the lower level of the chip.

Pin 7 6 5 4 3 2 1 0
DDRD 7 6 5 4 3 2 1 0

As you can see its gos in descending order from right to left. So if you want to set pins 3&4 for output on DDRD it would be DDRD = B00011000, since you either have on (1) or off (0).

Value 0 0 0 1 1 0 0 0
Pin 7 6 5 4 3 2 1 0
DDRD 7 6 5 4 3 2 1 0

Now back to my issue, I was passing the variable for pin 8 which as you can see there is no 8 on the DDRB, so I had to set it to 0 without using the variable. Now not knowing this did cause me about an hour of troubleshooting. But now that I learned this its much easier.

WARNING I am not 100% sure if DDRB can go past 4 bits or if it has to be 4, so be CAREFUL!

Pin 11 10 9 8
DDRB 3 2 1 0

Example say you wanted to set ping 8 & 9 to output. DDRB = B0011. Now on the official documents it only has DDRB with four bits. So you might only be able to set pin 8-11. So read up on it first, before you try to go higher, I only used bitRead() on mine.

Value 0 0 1 1
Pin 11 10 9 8
DDRB 3 2 1 0

If you want to read if the output on pin 9 is high or low just use “bitRead(PORTD,1)”.

I hope this information is useful to someone. This information is in the Arduino official documentation, the issue I had is it was not painfully obvious to me.

QR (Quick Response) Codes love them!

I love QR (Quick Response) Codes, my favorite way to use them now is as a method to send data, mainly links and text to my smart phone. I know there are a thousand and one ways to do this but I love the simplicity of just using the Mobile Barcoder extension for Firefox and the QR Droid app for Android.

You just highlight text or a link and right click and select “Create barcode from link” in the menu. Then it generates the QR Code, I then just use the QR Droid to capture it. I use this mainly if I want to read something on the go or send some quote that I then can send as text message. Bellow is a QR Code for the QR Droid app for the Android.

Enjoy!

VirtualBox, Dual Monitors and Linux

So I just tried out Ubuntu 12.04 and I am not sold on the interface, overall I still am kind of fond of Windows type desktops (Linux Mint is favorite so far). But this post is not about that, its about multi monitor setups.

Now a little background on my host machine, its Windows 7 64bit with VirtualBox and dual monitors. It seems to have no issue powering through virtual machines 32bit or 64bit. I have VirtualBox (get a copy!) 4.1.14; it supports more then one monitor, now I have read that previous version did as well but I have not tried this in over a year since my last attempts were unsuccessful.

Steps:

  1. Install VirtualBox (its free, Windows, Linux and Mac)
  2. Once you have created your virtual machine (VM) edit your settings.
  3. Go to Display section and increase the Monitor Count.
  4. Make sure to increase your Video Memory. If you don’t it won’t work (I should know, took me a bit to figure out that was my issue). I would go with the maximum 128MB if possible.
  5. Install your OS (you can do this before step 3&4).
  6. Make sure to install the VirtualBox guest additions.
  7. Then reboot and once you are back in you should be able to use more than one.

My best results where in full screen mode (right crtl+f) or seamless mode (right ctrl+l). It was great to have use of my two monitors while in Linux virtual machine. Now you can do this for Windows as well.

Have fun!

LibreOffice

So I just made the switch from OpenOffice.org to LibreOffice. Really nothing has changed to much. There have been some improvements, but also bugs. I just felt like I wanted a true open source office suite. The issue I had been hearing about OpenOffice.org was that since Oracle bough Sun, that they have kind of been moving at a slow speed and only letting Oracle staff work on it.

When LibreOffice spun up with the community members leaving OpenOffice.org, Oracle lashed out and had them step down.

What they want with LibreOffice is a true open source model such as the Linux Kernel, they wanted to also have the community add features and not be slowed down by one company who at any time could just change license and lock it down. I feel like I made the best choice for me. Also I kind of enjoyed telling Oracle what I thought. When you uninstall it take you to a website to ask questions on why and well I told them.

Hacker Spaces Alaska

OK so I am a little sad. There are no hacker spaces in Alaska anywhere, I know we only have around 710,000 but since its Alaska I would think we would have one if not more. I know a bunch of people who all have shops for welding, wood working, aircraft maintenance, etc. I know we have a nice sized ham radio fans here even around Kenai.

I often wonder why it might be we don’t have one. I would think that since we have long winters that having a space to get out and do things might be worth it. I do wonder if its just how Alaskans are, many come here to get away.

I have thought about starting one and I may start looking into that. But I think its a lot of planning. Just like some say need to get a few people who care a lot and from there.

My data is based on hackerspaces.org.

DHCPDISCOVER from XX:XX:XX:XX:XX:XX via ethX: network X.X.X.X/XX: no free lease

So I got that error while working on a Linux router. It runs on Soekris hardware, its running custom rolled Linux. I was not the one who set it up.

In order to even get that error you would have to run dhcpd -d ethX once you did that it would do that every time a DHCP request was sent.
Turns out in the end it was the clock. The box is set to sync time with the net well the router was not fully up so no internet. So when it started it got a time in the 1920s which causes a big big big issue with DHCP. So a few lines about syncing the clock after a NTP update was attempted fixed it from  happening again. I Googled the hell out of this and got nothing. Just thought it would not hurt to put it up so someone might find this.

RepStrap Part 2

So if anyone ever reads this might wonder why go with a RepStrap well I think I was inspired by Gavilan. He had a good a point about building and what he learned.

However, I now know how to write firmware and hostware to interface with microcontrollers, thermistors, endstops, and microstepping motors. I know how to solder through hole and surface mount components. I know how to model CAD parts to spec, and design schematics and circuit boards with Eagle. All this with only a software engineering background.
Original Post

I am more from the software engineer side (self taught). I have most of the basic things I need already since I dabble in the Arduino.

So I hope to gain more knowledge and insight. Also it will be really cool, I think my son who is four who loves robots, space and now Mario Brothers will really enjoy the things I can make for him and the things we can make together.

My dream goal would be to expand upon this and to make a more accurate version that can compete with the professional models.
I have looked at the CupCake CNC - MakerBot Industries but I want to learn more then just making a kit. Also in the long run it would be fun to see how cheap you could make one.

RepStrap Part 1

So I have been looking at the RepRap for a while (RepRap is an open source rapid prototype 3d printer) and have not been into it much until I ran across a post on hackaday about a guy who created a RepStrap which is a kind of hand built version of the Darwin (v1) to a Mendel unit (v2).

Now what got me was that he built a RepStrap which I was unaware of; which then helps you make the parts to turn your RepStrap into a RepRap or make the Mendel version. So now I have decided to look into making my own with the end goal of turning my RepStrap to a RepRap and then make a Mendel. This guys have some great links and posts about it and I hope to start up a conversation about it soon.

Check it out.