Setup Arduino on Debian

Some notes on setting up Arduino on Debian.

Add yourself to the required groups – dialout and tty.

sudo adduser $USER dialout
sudo adduser $USER tty

Confirm the port /dev/ttyUSB0 is being used by Arduino – tail messages then plug in the Arduino.

sudo tail -f /var/log/messages

# you should see something like:
FTDI USB Serial Device converter now attached to ttyUSB0

# out of interest, inspect permissions on port
ls -al /dev/ttyUSB0

Logout and login (or run a login shell). Confirm permissions.

zsh -l

# you should see something like:

Install Arduino pre-requisites.

sudo aptitude install arduino arduino-core

If preferred, download the latest Arduino environment, run the shell script to start it.

cd ~/arduino-1.0.5

Set the serial port (Tools -> Serial Port) to /dev/ttyUSB0. Any problems doing this, edit the serial port setting in ~/.arduino/preferences.txt

Hello World – upload Blink (File -> Examples -> 01.Basics -> Blink) to your Arduino, go crazy with that flashing LED!

Split() function for Microsoft MSSQL

Microsoft MSSQL doesn’t have a split() function (like in Ruby, Perl), so here’s one I wrote. It’s different from the other MSSQL split() functions out there on the intertubes in that it accepts a @pos parameter that specifies which split item to return – easier […] more…

MySQL SUBSTRING_INDEX function on Microsoft MSSQL

I’m porting some code from MySQL to Microsoft MSSQL, and unfortunately MSSQL doesn’t have a SUBSTRING_INDEX function. Here’s a version I quickly implemented, called “my_substring_index”. Limitations: only accepts strings up to 255 chars long only works with varchars – we speak ASCII here… more…

Microsoft SQL 2012 SSIS Create Catalog Password

Creating an SSIS Catalogue on Microsoft SQL 2012 seems to have an interface bug – you need to both “enable CLR” and provide an “encryption password”, but the options are mutually exclusive ie when I tried to type in a password, the interface locks the […] more…

Change default editor in Debian

How to change the default editor in Debian (for root), as I keep forgetting: sudo update-alternatives –config editor My ~/.zshrc takes care of this for my personal account, but it’s nice to change root’s settings so a better editor (than nano) comes up when editing […] more…

OSX TunnelBlick Multiple OpenVPN Configurations error unable to copy

When setting up TunnelBlick, if you have multiple configurations in your ~/Desktop/foo.tblk folder, you’ll get an error in the console log like: Unable to copy file foo to /var/private/bar… The solution comes from the TunnelBlick forum: There is a way to install multiple configurations all […] more…

ZFS List Snapshots, Create and Destroy Clones

I’m using FreeNAS for my storage at home, liking it a lot. But the web interface can get rather slow when searching for snapshots, as always the shell is faster. Some notes for me on listing ZFS snapshots, and creating and destroying clones. more…

Next Page »