Your source for daily hacks

Published on: August 15, 2013 / Comments: None

Get Gittin with Git

Albeit slowly, git is taking over your crusty old subversion repository.  The mainline Linux kernel development has already switched and github is just about as popular as ever nowadays!  So it’s time to learn some git commands.

Git might be a little difficult to wrap your head around at first, especially if you are used to using svn now.  Some things don’t translate 1:1. I found this great resource called  Git Magic .  It’s a GPL’d book on git.  It’s available in a ton of different formats and languages.  I prefer the PDF version myself.  It starts out by helping you get the concept around git, when you clone a repo (… check it out in svn speak) you are creating your own repo, which you publish your changes, and eventually push the changes upstream.  Then it covers a few scenarios that you are likely to run into.  A great book on git, especially for the price.   Well worth a read.

If you’re too lazy to read there’s always a cheat sheet.

Published on: August 15, 2013 / Comments: 1

Development environment setup and remote deployment for Beagle Bone Black

The Beagle Bone Black is a great embedded platform running Linux.  Sure you can download a pre-made distro and apt-get install whatever you want.  Or you can start writing your own apps (and not just python scripts either).  If you’ve never done any cross-compiling before it may be a daunting task to get up and running.

Michael has put together a really extensive guide to getting set up.  Normally you just install the right tool-chain and you are good to go, but he’s gone a step further with setting up a graphical dev environment (Eclipse) and showing you how to do remote deployment of your binaries.  This saves you the trouble of doing it manually (or even worse, rebuilding your sd-card image each time to put it on there).

Great article, check it out.

Published on: August 5, 2013 / Comments: None

Wrap your head around function pointers in C

Not to cause a language-preference war, but if you do programming you’ve probably written or thought about writing in C.  One very powerful tool in C  is utilizing function pointers, but they can be tricky.  Luckily Dennis took the time to create a useful write-up on the topic.

You’ll see by reading the article that using simple function pointers is a lot like using regular pointers (but as functions, lol).  However it gets more tricky when you start dealing with function arguments and return values.

If you need to take a step back, Dennis has some other useful tutorials you might be interested in.

Thanks Dennis!

Published on: July 31, 2013 / Comments: None

Coding on the Raspberry Pi without Python. No seriously.

It’s almost like every thing you see people code on the Raspberry Pi is written in Python.  Don’t get me wrong I love me some Python but sometimes you have to step your game up.  Hack Your Mind has you covered.  They’ve put together a Open Source C++ library for working with the GPIO pins on the Pi.

The video is actually a playlist of some of the functionality they have right now.  So the basics like controlling the GPIO states, doing matrix keypads, multiple display types, stepper control, sensors, etc.  If you want to get some speed out of your Pi and ditch the Python scripts, check out rpi-hw.

More details here.  Source code here.  Oh watch them videos again here.

Published on: July 24, 2013 / Comments: 1

Using the Peripheral Pin Select feature on a PIC24

pic24fjxxgb004Part 6 of Modtronics Australia’s PIC24 tutorial series,  Modtronics shows you how to use the Peripheral Pin Select feature on a PIC24 microcontroller.  This feature allows you to remap which pins are tied to which peripheral such as uart, I2c, SPI, etc.  Very useful feature when it comes to laying out a board, allowing you to lay things out because of convenience rather than necessity.  This could also lead to reusing of a certain pinout adapter across multiple configurations since it can be selected via software.

 

 

 

Other useful tutorials in this series: