I have had Natty on my Mini 9 for a few days. It runs like a top.
Solid state HD equates to a sub double digit boot time…be sure to configure compiz via: sudo apt-get install compizconfig-settings-managerThat is about it. Plus 1. I would rattle on about 11.04, but I already have a few posts back. Besides, I have bigger fish to fry. Namely, Gannon…
I’m in my 30s, and just now getting around to beating Ocarina of Time. Katie and Man-Dawg are watching the Bachelor (or Bachelorette; no effing idea) downstairs…here goes nothing
Makeshift Linux Heads-Up Display
Per my last post, I began upgrading my Dell Mini 9 last night…from Ubuntu 10.10 to 11.04. Well, at some point, it tossed a fit about not being able to snag a package, and hung on a dialogue box all night. No worries…I’ll finish this install on the way to work.
Who said netbooks are passe? Looks like that guy was designed to ride on the dash of a Silverado if you ask me. For the record, I was not doing 110 MPH by the MSU campus. I have an issue with my speedometer. I was doing 90 MPH, tops. My install was a success for the record. I will see if all functions are fully functional soon, and put together a post.
Ubuntu Natty Netbook
As my primary notebook has proven that can run several terminals, a Firefox tab or four, Eclipse, and the Arduino IDE simultaneously without shitting the bed, it is time for my netbook to follow suit. Q: What suit? A: The Ubuntu 11.04 suit…you know, Natty Narwhal? Q: I don’t know cards. This is cards, with the suit thing, right? A: Busted. No idea…very unsure of the spelling of ‘suit’ too FWIW
Tune in tomorrow to see how it all ends up. Wear a suit.
Basic Mower Cord Repair
I snapped our lawnmower cord. Oh snap.
As it happens, I can fix anything. Without exception.

My one-pull-wonder lawnmower has been a great machine. Katie has been using this mower since she was a tween…my father-in-law upgraded and packed this to Bozeman when he upgraded to a new mower many mows ago. With a thunderstorm brewing, I was in a hurry, and swoll, and I ripped the cord in two.

No good. Let’s fix it. Pliers and snips…get in there. See how it works.

I noted a spindle, sans an enclosed routing. There was a lead weight on the cord, apparently fitted to keep some back-tension to alleviate any sort of rat’s nesting extra cord. I dug up the access point via my makeshift access point:

Cord: fed. Next:

I noticed that the cord had been singed at the ends. When in Rome…singe the cord. Video time:
It works. I couldn’t figure out how to wrap the excess chord without disassembling the fuel system, so I didn’t. We have an awfully short action on our lawnmower pull, but it fires right up when primed. +1 works as intended.
Not a bad little Monday-after-work-trying-to-do-something-mundane-and-learning-some-awesome-junk. I should update my resume.
Trustworthy Online Brokerage Account & Services
So. I may be one of the only people in the world left who listen to talk radio. More embarrassing than that, I would, without a doubt, be considered a dedicated listener. There is nothing worse than the audio quality of AM radio, except for AM radio in a truck with all sorts of metal accelerating around…big pistons, questionable wiring, and a poor antenna make for very, very poor radio reception. Interference, for the loss. I used to be all over antenna theory back in my undergrad days…KD7NZI. Yep. Licensed HAM radio dude. I promise to touch on that one of these days. Or threaten. Now, I am pretty much on the AM radio, and on my talk shows. The heart of the matter for today lies in ways to handle finances. My beloved, awful AM radio is nearly wall-to-wall advertisements for gold purchasing firms. Places of ill repute, when compared to legitimate stock account joints. It may be tough to consider, but it is very important to do so. Money of all nature has (inherently) value, and that is not to be taken lightly. Pause for picture.
I do 100% of my money work online. In fact, my Wells Fargo accounts have embarrassingly small rates of return…interest takes second base to online access for me, for what it is worth. That is where it is…from my IRA, to my stocks, to my savings and DDA accounts, it is all accessed/managed online. The question remains, what do you do to juggle all of these balances? Is there some sort of service that you can find to consolidate stuff of this nature? Yes, there is. Hint: that link back there <— Take a look. Do what you will. Drop me a line with any suggestions you may have….and good luck.
HTML to Python to Arduino to LCD
Last week found me standing tall upon my shell script soapbox, shouting command line praises to all who would listen.
Thou ought direct thine output aftways, to-wards thine USB port of thee. And that is well and righteous.
Well, that still is the case. My latest project has made it glaringly obvious that sometimes a little Python script will render a whole bunch of shell scripting moot. Namely, parsing HTML. Let’s see a picture…

Lunch hour project: parse the comments from swantron.com; feed said comments to an LCD screen.
I was horsing around with wget from a CLI a few days ago. I found myself trying to smash through the resultant file via pure regular expressions…which is incredibly clumsy. Well, as luck would have it, my go-to after my main go-to is Python, and this type of thing has been issue enough to warrant a library. BeautifulSoup. It acts to parse the HTML info into items, that can be smashed around as I see(med) fit.
My setup was simple: py script to snag my comments and write serial, Arduino sketch to drive a LCD and read/write serial. And a source of shade. And a WiFi signal to snag.

Check, check, check, etc. Video time:
Python parser / serial writer
#!/usr/bin/python
# https://swantron.com
# htlm grab / parse...
# ...write to serial out
# 2011
admin = [ 'Joseph Swanson' ]
total = True
import urllib2, time, serial, sys
from BeautifulSoup import BeautifulSoup
# disregard spammers | disregard identical posts | create spam zone
spam = []
# initialize serial write to Arduino
ser = serial.Serial('/dev/ttyUSB0', 9600)
time.sleep(5)
# work section
while True:
# snag html
html = urllib2.urlopen("https://swantron.com/comments/feed").read()
# parse
soup = BeautifulSoup(html)
# inspect parsed results
for item in soup('item'):
badGuy = item('guid')[0].string.split('comment-')[1]
if badGuy not in spam:
# spammer jail
spam.append(badGuy)
# time modification
postTime = item('pubdate')[0].string
parsedTime = time.strptime(postTime, "%a, %d %b %Y %H:%M:%S +0000")
offsetTime = time.mktime(parsedTime) - time.timezone
localPostTime = time.strftime("%m/%d/%y %H:%M", time.localtime(offsetTime))
# identify me
author = item('dc:creator')[0].string
if author in admin:
print "(" + localPostTime + ") I, " + author + ", just posted a comment"
print " " + item('guid')[0].string
print " " + item('description')[0].string
ser.write(item('description')[0].string)
time.sleep(1)
elif total:
print "(" + localPostTime + ") background noise ~~ " + author
print " " + item('guid')[0].string
print " " + item('description')[0].string
ser.write(item('description')[0].string)
time.sleep(10)
Arduino LCD driver
// LCD Driver
// https://swantron.com
// basic serial in > LCD display
// 2011
#include <LiquidCrystal.h>
// **Define pins**
// LCD RS - pin 12
// LCD R/W - pin 11
// LCD ENABLE - pin 10
// LCD BACK+ - pin 13
// LCD DATA4 - pin 5
// LCD DATA5 - pin 4
// LCD DATA6 - pin 3
// LCD DATA7 - pin 2
// LCD VSS, CONTRAST, BACK- - ground
LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
int backLight = 13; // Define pin for backlight
void setup()
{
pinMode(backLight, OUTPUT);
digitalWrite(backLight, HIGH); // Backlight level (LOW / HIGH)
lcd.begin(20,4); // (Columns, Rows)
Serial.begin(9600);
}
void loop()
{
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}
I’m excited about this project. Even though this deal is in gen 3, I still have some crazy take-off ideas. Create a secure page on swantron to hold a few values…hook up my old notebook as a base station…home automation on the cheap. Replace that LCD with a sketch to search for a particular string, i.e. “open garage door” and boom, there you go. This could be very cool. Introduce twitter to remove my server from the equation…awesome.
Hit the comments with any improvements or project ideas you can conjure. This one has me excited…feel free to challenge me with something cool. As always, thanks for reading, yadda yadda, stay tuned, etc.
Python Teaser
After a deal of success with the command line interface-to-Arduino project, I am in the middle of stepping it up a notch. I ended up on a few blogs due to that last effort, which indicates that I am doing something worthy of note. Hats off to me, perhaps. Well, my tool belt is what it is…if I can’t do it via shell scripting, I reach next for Python. In an attempt to parse stuff that I have been ‘getting’ via wget, I found myself trying to do some clunky regex from the command line. Guess what…I can do that without as much heartache via Python via BeautifulSoup…
Thus far, I have python doing the website getting and Beautiful Soup doing the parsing of my site…basically just grabbing some info at this point that I can modify. I have my LCD driven via my trusty Arduino, and that is that. Instead of redirecting standard out to serial, I am writing to serial via python. Easy breezy. I have some sloppy sloppy code at this point, and need to add some hardware and stuffs to my prototype. Stay tuned…this could be a good one.
Woot BOC Unboxing
It showed up…
I got excited and made an un-boxing vid. Apparently, I get twitchy when I am excited. Probably why I interview like shit. Anyhow… So, my three dollar (eight with shipping) bag of crap yielded: * Passive laptop cooling pad * Refurbished DSL router * Strawberry that unfolds into a bag? * Remote controlled Batman helicopter * Three dog brushes Not bad at all; I’m chalking this up as a win.
It Never Rains
Greetings from 4800 feet above sea level…the ever-lovely Bozeman, Montana. Bad news to everyone to the right side of the Rockies: we are sending more water your way. Bozeman Creek is starting to hop some banks.
I jumped on the CT-90 after work and headed out to survey the situation. These pics were taken in Bozeman proper…on Church street North of Kagy.
There have been some road closures further North, as the stream has been running over a few roadways. Coincidentally, both major breaches have been near culverts…one under Mendenhall and one under Kagy. Poor planning, city engineers. A few hundred yards down the road from the bridge, I popped into my sister’s old condo complex. I have seen some sandbagging there in the past.
A for effort, guys. Take the grade into consideration next time. This thing is slated to crest next week….we’ll see what happens. Strange year for extreme weather, to say the least.
Compiz Error in Ubuntu Natty
For the most part, I have had good luck with Compiz, Unity, and Ubuntu 11.04 in general. I have said it before, but worth a repost…if you do a vanilla install of Ubuntu, the first thing you should do is get the Compiz configuration tool…I’ll even spell it out.
- Open a terminal window (Ctrl+Alt+t)
- Run this command: sudo apt-get install compizconfig-settings-manager3) Hit enter…done. Nothing to it. Anyhow, I have seen the following bug a few times…so I finally snagged a screenshot:
It appears that the workspace switcher and wobbly windows have some sort of issue with one another. I don’t see this when I use keyboard shortcuts, and I have been employing those nearly extensively to pop around. Super Key+S (Windows key / Apple key) to open the switcher…or bypassed with Ctrl+Alt+left or Ctrl+Alt+up for instance. It works slickly, once you spend some time poking around. I suppose it would be prudent for me to enter this bug into the Ubuntu QA system…I am not in the mood to search for duplicate tickets. I do that crap all day at work…enough is enough. Drop me a comment if you have seen this one in action. Or, if you have any workspace suggestions, send that over too.