Cheap DIY treadmill desk that won’t murder your wrists.

I sit at a computer the better part of my day. I try to mitigate this some by walking around (pacing) while I’m on the phone. On days I work I’m lucky to get in 7,500 steps, this is below the 10,000 generally considered to be healthy.

One day I stumbled across an article about a DIY treadmill desk, essentially you bungie cord a board to your treadmill, set your laptop on it, and then walk and work. That piqued my interest, but my first thought was that it would kill my wrists. If I don’t keep my hand level with my wrist/arm I feel it very quickly. I’m well aware of the permanent damage you can do to yourself by keeping poor wrist posture.

You can buy some really good looking treadmill desks that can be adjusted up and down, but its a large expense for something I wasn’t sure I would even be able to use. I was on the fence if I could even walk and type at the same time.

I wanted something I could try out cheaply. I built a reasonable facsimile for about $50.

My idea was this:

  • Use a TV wall mount to attach a spare monitor to the wall in front of the treadmill
  • Set my laptop on a table next to the treadmill.
  • Build a raised desk attached to the treadmill’s rails. This would be where the keyboard and mouse would sit.

Parts I had to buy:

Total: $51.50

Parts I already had:

  • Treadmill
  • laptop
  • extra monitor
  • keyboard
  • mouse and pad
  • build tools and fasteners
  • table to put laptop on

Building it

The general idea is that you’re going cut one of the shelf boards into legs and attach them to the intact board.

The top of the desk should be level with your elbow when held at your side. I stood on the treadmill and measured the difference between my elbow and the top of the rail, this was 7.5 inches. My U-bolts were 2.5 inches wide. To give myself some room I took the elbow measurement and added 4 inches (U-bolts size plus extra) to it. 11.5 inches was the length of my desk legs.

After cutting the legs I needed to know where to drill holes for the U-bolts to go. I measured from the top of the leg down 7.5 inches and made a mark, this was where I needed to drill for the first hole for the U-bolt.

I assembled the desk in place. I attached the legs to the treadmill with the U-bolts, and then placed the remaining board on top and screwed it into the legs.

My last step was mounting the monitor to the wall. I followed the instructions that came with the mount. You’ll want the monitor to be positioned in such away that you don’t have to look up or down to see it.

Below is what it looks like completed. Not the prettiest project I’ve ever done, but functional. Fortunately I work at home and no one ever sees my office.

20141023_215456727_iOS20141023_215517791_iOS desk2

How does it work?

Surprisingly well. I set the treadmill to 1.6 MPH. I’m able to walk and type and use the mouse OK. Walking doesn’t mess with my concentration. I gave Kerbal Space Program, Team Fortress, and DOTA a try, no problems at all. I did have to train myself a bit not to step off of the treadmill when circle strafing in Team Fortress.. I would naturally step to the side and eventually make it off of the treadmill.

I don’t use the treadmill desk full time. I have a normal sit down desk that I use for the majority of the day. I use the walking desk for an hour or so to make sure I meet my 10,000 step goal for the day. I do roughly 1,000 steps each ten minutes I walk at 1.6 MPH.

Future Improvements/If I did it again

If I had to do it over again I would use actual real solid wood for the desk. It would look better, be stronger, and last much longer. Engineered wood was some good uses, furniture isn’t one of them. Especially furniture built by a guy like me.

I would take off the control console of the treadmill and run all of my wires through the middle of the metal support posts.

I would also think long an hard about a better mounting method than the U-bolts… they’re ugly.

 

What is the best handheld emulator console?

It’s no secret I like old games. At one time or another I’ve used an emulator on every handheld device I can find. Which one do I think is the best?

Sony PSP

If you already have a PSP this is a good choice. PSPs are very easy to load emulators on. They will run consoles up to SNES or GBA just fine. They’ll run PSP games and stream from your PS4 too.

Nintendo 3DS

A 3DS can emulate up to SNES era. It will semi-natively run GBA and DS games. It’ll run 3DS games too. You’ll need to buy a DSTWO flash cartridge though to get everything working. The build quality on the DSTWO carts can be suspect, mine works but is held together with tape. Unless you already have a 3DS I wouldn’t bother.

Android Phones and Tablets

The quality of the emulators for Android is outstanding. You can easily attach purpose made Android controllers or even use a PS3 or XBOX controllers. A two year old Samsung Galaxy S3 will emulate NDS, N64, and PSX games. 

iPhone and iPad

IOS devices will run emulators once jail broken. I wouldn’t recommend it. PITA to jail break and then a PITA if you want to update your phone. There is also a trick wherein you can install and run an emulator if you change the date on your phone every time you load the emulator, again a PITA. (This doesn’t work in the newest IOS version)

Random Chinese Android Consoles

They’re great when they work. The build quality and battery life can be very poor. There are a lot of different devices out there and I’m painting with a wide brush. Unless you can get one for practically free I would stay away.

GCW Zero

The GCW Zero will run anything up the SNES era. The build quality can be iffy at times. The battery life is awesome. If you can find one for under $100 its not a bad choice, though you can find PSPs for under a $100 and the PSP would be a better choice.

NVIDIA Shield Portable

The Shield has all of the good points of an Android phone and a built in controller. It will run any system short of the Game Cube. It’s seriously good.

What do I recommend?

If you have an Android phone made in the last two years, get yourself controller and use it. If you don’t have an Android phone, buy an NVIDIA Shield.

The quality and the ongoing support for emulation on Android is really amazing. The quality of the hardware on most Android phones and definitely on the Shield is excellent.

Cost wise a phone or a Shield are great choices. An NVIDIA Shield portable is $150 at the time this was written. An Android phone is something lots of people already have, you can get yourself setup with controller that attaches to your phone for less than $50. The other devices I mentioned in this post typically start at around $175 and go up from there.

I have an NVIDIA Shield and love it.

pdtk on RedHat Enterprise Linux 7 (RHEL7)

I use pdftk in order to split PDFs into individual files for each page. I recently moved a server to RHEL7 and was kind of disappointed that I couldn’t find it via yum. I tried finding an RPM, I tried an RPM from a previous version, I tried to build from a source RPM, I tried to build from the source, no luck. As with most things I suppose I could keep beating my head against the wall and blow a bunch of time to figure it out, but why bother?

It turns out the ImageMagick’s convert command will split a PDF into individual pages. ImageMagick is easily installable via yum. I don’t believe I’ve seen many Linux systems without it. It also has Window binaries.

Here is the command:

convert -quality 100 -density 200x200 PDF-IN PAGES

Amazon Fire TV NES, SNES, and GBA Emulators

The Amazon Fire TV can run NES, SNES, and GBA games. You can even use the included remote, though the game controller works much better.

I made up a package with a batch script that makes it pretty easy.

Here is how to play NES, SNES, and GBA games on your Amazon Fire TV.

Note: This does not require you to root your Fire TV. You will not lose access to the Amazon interface. Nothing will be removed or change. If in doubt look over the package you download and definitely look over all of the .bat files.

Enable USB Debugging and Find out the IP address of your Fire TV

This steps turns on the features that allow you to remotely install software on your Fire TV.

  1. From the Fire TV Home screen, select Settings
  2. Go to System -> Developer Options
  3. Select ADB Debugging to turn it ON
  4. Go to System -> About -> Network, and take note of the Fire TV’s IP address

(Thanks XBMC Wiki)

Download and Extract my Installer Package

Amazon Fire TV Emulator Package: Download

Once you have it downloaded, unzip it.

Install Emulators and Send Your ROMs to the Amazon Fire TV

Installing the emulators:

  1. Double click on INSTALL-EMULATORS.bat (in the installer package)
  2. When prompted, enter the IP of your Fire TV
  3. You should see the emulators install with a ‘Success’ message

Copying the ROMS:

There are folders for ROMs for each system in the installer package. Copy your ROMs into the folder appropriate for them. If your ROMs are zipped, unzip them. Make sure the NES ROMs have a .nes extension, SNES .smc, and GBA .gba.

To play GBA games you’ll need a GBA bios file. Put it in the ROMS-GBA folder.

Once you have everything in the appropriate folders, double click on INSTALL-ROMS.bat. When prompted, enter the IP of your Fire TV. You should see everything copy over.

If at some point in the future you want to add more ROMs to your Fire TV, just add them into the appropriate folder and double click on INSTALL-ROMS.bat again.

Launch Emulators and Configure 

You should now have your emulators and ROMs installed on the Fire TV. Unfortunately side loaded applications do not appear in the Home screen, you have to launch them via the Settings menu.

  1. From the Fire TV Home screen, select Settings
  2. Select Applications
  3. Find and select the emulator you want. (Nesoid, Snesoid, GameBoid)
  4. Select Launch Application

You will want to go into the settings for the emulator and map the buttons for the remote (or your controller) to the game buttons.

Where to go From Here?

If you’re only using the remote that came with the Fire TV you’ll want to get a real controller. The remote works OK for RPGs and games that don’t require twitchy actions. Amazon sells a very good controller made for the Fire TV. XBOX 360 and PS3 controllers work well too.

The emulators I’ve included are not the best out there. There are some really good commercial Android emulators out there, installing and using them makes for a better experience.

What Exactly does the Installer Package do?

The general idea is that it side loads the emulator’s apk files via winadb. The installer package (if you can call it that) contains a apks for the emulators, winadb, and a couple of .bat files. The .bat files launch winadb with the appropriate commands to connect to the Fire TV and install the emulators. You can easily modify the .bat files to allow you to install other emulators.

ASUS RT-N66U: Other odd system log messages explained

Aside from the, ‘WAN Connection: Ethernet link down.’, message I was seeing in my ASUS RT-N66U system log, there are two other error messages that appear often.

miniupnpd: unsupported NAT-PMP version : 2

This message appears in my log every hour on the hour. As near as I can tell it doesn’t cause any problems with my Internet connection or general network performance. I’ve figured out it only occurs when my wife’s Mac Mini is turned on. The Mac works just fine  during and outside times the error message is being logged. Either Mac OS itself or some program she has is using UPnP in a way the ASUS router doesn’t care for. I don’t have a good answer on this outside of saying it doesn’t seem to affect much.

kernel: eth1: received packet with  own address as source address

I have two access points in my home, both with the same SSID. The first access point is the one built into the ASUS RT-N66U, the second access point is an old Netgear router with everything but the access point functionality turned off.

This error occurs when a client moves from the ASUS RT-N66U to the Netgear access point. The network is general is not affected. The client moving between the two access points will lose some packets. The packet loss isn’t noticeable unless you are looking for it.

 

The one slim wallet to rule them all

After a string of Kickstarter slim front pocket wallets I’ve finally found a replacement for my Dopp Wallet, a Ralph Lauren Silk Tie Card Case.

Problems with the Kickstarter wallets

The biggest problem I had with the Kickstarter wallets was their durability. Each wallet I tried ended up with either frayed cloth or elastic after a few months of use. In comparison my Dopp wallet has been with me since I was a teenager and looks great. A secondary problem, considering I was searching for function, was that they tended to look dorky, I would point out that The Ridge wallet was an exception to the dorkiness.

The Ralph Lauren Silk Tie Card Case

Card case is an apt name for this as there isn’t much room for cash, photos, business cards, or the other things people keep in their wallets. As a guy who only carries a couple of credit cards and IDs its perfect. The wallet is leather with one side covered in silk tie material. It’s small, not much wider than a credit card. The thickness is about three credit cards.

I’ve owned this wallet for about three months now. There is no wear and tear evident. If anything it looks better now as riding around in my pocket has polished the leather a bit.

I’ve not found a thing I don’t like about this wallet.

You can buy the Ralph Lauren Silt Tie Card Case directly from Ralph Lauren.ralph_lauren_wallet

 

 

ASUS RT-N66U – WAN Connection: Ethernet link down.

A few weeks ago I began to have a recurring and incredibly frustrating problem with my Internet connection. Multiple times a day my Internet connection would drop for a couple of minutes at a time. My cable modem would show I had a good link. Upon checking my ASUS RT-N66U router I would see this in the system log:

WAN Connection: Ethernet link down.

Then a few minutes later the connection would come back on its own. I would see this in the log:

WAN Connection: Ethernet link up.

I work from home, mostly using SSH to log into remote servers. My connection would flake out just long enough for my SSH connection to drop. It drove me up the wall.

I did a lot of Google searching and couldn’t find much of anything about the problem. What I did find wasn’t productive.

Going strictly off of the error message I figured I had one of three problems, bad network cable between the router and modem, bad WAN port on the router, or bad WAN port on the modem. I changed network cables with no luck. I replaced my ASUS router with an old Netgear router I had. The problem stopped. I went back to the old cable, still no problem. I put the ASUS router back into play, the problem started again. I knew it had to be something with the ASUS router. I had owned it for too long to send it back for warranty coverage. I also thought it odd that the hardware in the WAN port could be flakey enough to cause an intermittent problem like this while otherwise working fine. I figured it was software related.

In order to simplify things I turned off every feature of the router I didn’t %100 need. Guest wifi network, QoS,  USB support, DDNS, cloud support, and so on and so forth were turned off. I even shut down the second access point I have in my house. After simplifying everything something wonderful happened. The problem stopped. I gave it a few days to be certain and sure enough, no more drops.

I then began to turn on each service again, one per day. When I turned on DDNS via no-ip.com the drops started again within a few hours. I turned off DDNS and the drops stopped. The culprit had been found.

I don’t have a good idea why the DDNS client causes the WAN Ethernet port to drop out. Its some sort of bug in the 3.0.0.4.376_1071 firmware I’m running.

In the end my solution was to leave DDNS turned off in the router and then to install a no-ip.com update client on my computer.

TL;DR

My ASUS RT-N66U router started dropping my Internet connection. It had something to do with updating no-ip.com. Turning off the DDNS client solved the problem.

Update 9/10/14: I switch to the Merlin Firmware and even with DDNS turned on the router has been fine with no drops. That aside the new firmware is working great, all of the features I would expect and I have not noticed any change in my speed.

Landscaping and Erosion Control on a Steep Hillside

Several years ago I bought a split level home overlooking a lake on a steep hillside in Northwest Arkansas. The only access to the lake was via 114 rotten wooden steps. Attempting to walk down the hillside without the steps was next to impossible due to the grade. The soil was white, powdery, and full of limestone rock. Between the soil quality and the needles from several pine trees, nothing grew outside of some stunted bushes.

Things were OK until I cut down all of the trees and removed the steps to open up the view. After doing that I ran into a erosion problem. Bad enough that after a particularly heavy rain storm I found a newly formed ditch  a couple of feet deep. After a lot of trials and errors that involved bringing in several square yards of dirt to fix, I’ve finally hit upon some methods that work.

Trials and Errors

Surprisingly the Internet isn’t a good resource for erosion control. Most of what I could find related to erosion control in desert environments, such as southern California, or temporary control related to construction run off. Neither of which would help me build a permanent solution in my humid subtropical northwest Arkansas home that receives sixty inches of rain a year.

Spreading hay: In theory if you spread hay over bare dirt with some seed laid down the hay will hold in moisture, stop the rain from washing everything away, and keep birds away from the seeds. Three years after spreading hay I still find it random places. To say its messy is an understatement. The first windy day will spread your hay to every nook and cranny around. On a steep hill rain will wash the hay away along with whatever is under it.

Planting grass: During the first fall I planted some winter rye grass. As far as erosion control it worked pretty well. It grew quickly and held the dirt down well. The problem with grass is that it grows tall. You either have to mow it or knock it down with a string trimmer. Mowing on a steep hill side sits somewhere between pain in the ass and impossible.

Gravel: If you lay down a couple inch thick layer of 3-4 inch gravel, erosion stops. This works, but I don’t like the way it looks. I want some green.

Concrete: I had a concrete walking path built. It only served to stop the water in places it shouldn’t, and then speed up the water everywhere else. I wish I could jackhammer the whole thing up and get rid of it.

What worked

Control water at the top of the hill so you don’t have to worry about it at the bottom: I built two large drains that collect all of the water at the start of the slope and carry it all the way down to the lake, bypassing my backyard entirely. This stopped the majority of the problem all by itself. Once the drains were built the only water I had to deal with is what actually fell in the backyard. These drains were both hand dug, no way to get machinery where I needed it because of the slope.

Swales: The best way I can describe a swale is a drainage ditch that doesn’t go anywhere. You dig a ditch that is level to the grade. It fills up with water and holds it there until it naturally percolates down into the soil below.

Walking Trails: I had a zig zag of walking tails built down the slope. It took about a day for a guy with a small skid loader to do the job. The trails are covered in compost. The grade of the trails is slight enough and the compost absorbent enough that they act like swales.

Clover and Vetch: Clover and vetch are two low growing legumes. Clover looks just like you think. Vetch looks something like a fern. Both plants fix nitrogen into the soil improving the quality. Both look nice, stay green all year, have pretty flowers most of the summer, and grow low enough you never have to mow. Animals love it, I have deer, rabbits, and geese that hang out all day. Use white clover, other clover species can get tall.

Compost, compost everywhere: The city I live in sells compost by the yard so cheaply they almost give it away. Originally I used the compost to cover the walking paths I built down to the lake. Pretty quickly grass began to grow on the paths. It grew so well that I couldn’t keep it knocked down. I then ran with the idea and put down compost everywhere. I raked the soil a bit, dropped the clover and vetch seed, and then spread compost. Wash, rinse, repeat, for the entire back yard.

TL;DR

In my opinion what really worked to control erosion were three things, use drains/trenches to control water at the top of the hill, cover any bare dirt with compost, seed heavily with clover and vetch.

 

 

Amazon Fire TV and XBMC

My review of XBMC on Amazon’s Fire TV can be summed up easily, I’ve moved from my custom built HTPC to using a Fire TV for my day to day TV watching.

Commonly asked question I see about the Fire TV

  • It’s easy to install.
  • You don’t need to root the Fire TV
  • I have it plugged into a 5.1 surround system via HDMI. I didn’t have to go to any trouble to make it work.
  • I have about 3TB of media on an SMB share. My library is shared via MySQL. I had no problems getting this to work with the Fire TV. Navigating the library is just as snappy as my old HTPC.
  • The Fire TV will play a 1080p 5.1 surround sound movie without issue.
  • The Fire TV will play a 1080p MPEG-2 stream from a HDHomerun device without issue.
  • The Fire TV will play an USTVNow stream without issue.
  • The default remote map isn’t good. There are much better keymaps out there.
  • I could not get it to work correctly with a FLIRC and a Harmony remote. (See Cons below)
  • You can side load emulators. Anything up the PS1/N64 generation works. Though you’ll want to root it so you can use storage devices other than the built-in. This is much, much easier than getting emulators to work on other XBMC hardware/operating systems.
  • XBOX 360 and PS3 controllers work.
  • It’s by far the easiest way to get Netflix, Amazon Prime, and XBMC all on the same box.

Pros for the Fire TV

  • It makes no noise
  • It doesn’t produce any heat
  • It’s small. I have it hidden behind a photo 5×6 frame on my entertainment center.
  • It’s cheap! The Fire TV is $100. I spent about $375 on my HTPC less than a year ago. I thought it was cheap at the time.
  • You don’t have to jack with it much to get XBMC going. No custom hardware to put together, no OS install, ect, ect.

Cons for the Fire TV

TL;DR

The Amazon Fire TV is the best hardware to run XBMC on.

USTVnow Command Line Stream File Generator

I’ve changed the USTVnow script from my previous post. I needed it to work without XBMC running or even installed.

The script below will login into USTVnow, grab the stream info for each channel you have access to and then write out .strm files to a directory of your choosing. To use it just change email, password, and stream_dir to your own credentials.

I have the script set to run via CRON every thirty minutes. Then I have the scripts stream_dir setup as a source in XBMC so I can play the stream files.

The script is pure Python and should run on anything that will run Python. No need to have XBMC working.

Download: ustvnow.py


#!/usr/bin/python
'''
    ustvnow XBMC Plugin
    Copyright (C) 2011 t0mm0

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

20131227 - Modified by Dean Vaughan - http://deanvaughan.org to work from command line and output stream files to a directory
20140610 - Modified by Dean Vaughan - http://deanvaughan.org to work without XBMC running or installed

'''
email = 'youemail'
password = 'yourpassword'
stream_dir = 'Streams'

stream_type = 'rtmp'
quality = '1'

import cookielib
import os
import re
import urllib, urllib2
import sys

class Ustvnow:
    __BASE_URL = 'http://lv2.ustvnow.com'
    def __init__(self, user, password):
        self.user = user
        self.password = password

    def get_channels(self, quality=1, stream_type='rtmp'):
        self._login()
        html = self._get_html('iphone_ajax', {'tab': 'iphone_playingnow',
                                              'token': self.token})
        channels = []
        for channel in re.finditer('class="panel".+?title="(.+?)".+?src="' +
                                   '(.+?)".+?class="nowplaying_item">(.+?)' +
                                   '<\/td>.+?class="nowplaying_itemdesc".+?' +
                                   '<\/a>(.+?)<\/td>.+?href="(.+?)"',
                                   html, re.DOTALL):
            name, icon, title, plot, url = channel.groups()
            if not url.startswith('http'):
                now = {'title': title, 'plot': plot.strip()}
                url = '%s%s%d' % (stream_type, url[4:-1], quality + 1)
                channels.append({'name': name, 'url': url,
                               'icon': icon, 'now': now})
        return channels

    def _build_url(self, path, queries={}):
        if queries:
            query = build_query(queries)
            return '%s/%s?%s' % (self.__BASE_URL, path, query)
        else:
            return '%s/%s' % (self.__BASE_URL, path)

    def _fetch(self, url, form_data=False):
        if form_data:
            req = urllib2.Request(url, form_data)
        else:
            req = url
        try:
            response = urllib2.urlopen(url)
            return response
        except urllib2.URLError, e:
            return False

    def _get_html(self, path, queries={}):
        html = False
        url = self._build_url(path, queries)

        response = self._fetch(url)
        if response:
            html = response.read()
        else:
            html = False

        return html

    def _login(self):
        self.token = None
        self.cj = cookielib.CookieJar()
        opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.cj))

        urllib2.install_opener(opener)
        url = self._build_url('iphone_login', {'username': self.user,
                                               'password': self.password})
        response = self._fetch(url)
        #response = opener.open(url)

        for cookie in self.cj:
            if cookie.name == 'token':
                self.token = cookie.value

def build_query(queries):
    return '&'.join([k+'='+urllib.quote(str(v)) for (k,v) in queries.items()])

ustv = Ustvnow(email, password)
channels = ustv.get_channels(int(quality), stream_type)

if(len(channels)):
    old_streams = os.listdir(stream_dir)
    for old_stream in old_streams:
        if 'USTV-' in old_stream:
          os.remove(stream_dir + '/' + old_stream)

for c in channels:
    title = c['now']['title']
    title = re.sub('[^\w\-_\. ]', '', title)
    title = title.replace(' amp ', ' and ')
    f = open(stream_dir + '/USTV-' + c['name'] + ': ' + title + '.strm', 'w')
    f.write(c['url'])
    f.close()