GPIO using Fedora 18 on pcDuinoI recently purchased a pcDuino because of it’s plenitude of I/O (5v) GPIO pins. My Raspberry Pi was an interesting board, but it lacked the GPIO and Analog to Digital inputs that make the Arduino so useful. The Arduino, while imminently useful, lacks the power to handle images and other high-bandwith tasks so it’s relegated to motor control and simple I/O. The pcDuino comes well-outfitted compared to both the Raspberry Pi and the Arduino:
Once I saw the horrid version of Lubuntu that came pre-installed on the device, I started looking for a Fedora port. Luckily Hans de Goede has published a Fedora port for the Allwinner 10 chip. Loading this was simple and straightforward – just follow the README
Then came the task of accessing the GPIO. The Lubuntu image that came with the device exposed some GPIO pins at
After following the guide on elinux.org, I was still unable to access *any* GPIO. Then I remembered that I chose “cubieboard” when I loaded the port by Hans. More hunting revealed uboot, sunxi-tools and the
Pic or it didn’t happenBash shell script that blinks the LED Making Fedora 17, Unicorn and nginx work togetherI had a heck of a time getting a Rails+Unicorn+nginx deployment going on Fedora 17. The problem was, I could get it running using TCP sockets but not using unix sockets. I loosely followed these instructions for deploying a Rails 3.2 app but kept having problems with the unix sockets. The Solution:
Don’t put the socket file in the /tmp directory.
The Why:
Fedora has this in
And if you look over on the Unicorn site, you’ll see this as the documentation for the listen method / configuration setting
Which encourages folks to put the socket in the
While debugging this I got the infamous “502 Bad Gateway” page from nginx. I checked out the
2013/04/05 12:25:58 [crit] 2906#0: *29 connect() to unix:/tmp/my_project_name.socket failed
(2: No such file or directory) while connecting to upstream,
client: 192.168.10.234, server: my_project_name.railsit.com,
request: "GET / HTTP/1.1",
upstream: "http://unix:/tmp/my_project_name.socket:/",
host: "my_project_name.railsit.com:8081"
So, after a couple of hours of head scratching and WTF’ing, I remembered that Hope this helps someone. Disable double click for HTML linksI’ve got a bunch of users that constantly double click html links. Also, I’ve had a few users probing my apps trying to expose holes. Those probes have generally included either clicking links multiple times, or automatically submitting URLs via some automated process. When I added messages to guide users that were re-submitting the same URLs, the double click users showed up as potential offenders. I needed a way to keep the double click users off of my intrusion detection report, but still be alerted to the more nefarious users. The solution to this problem is preventing browser based double clicks I think my solution is elegant. I didn’t find this solution on the Internet, so I decided to post it here. Simply make the onclick handler for the <a> tag reset it’s onclick handler to return false: I’ve tested this in Chrome/FF/IE8/IE6 and they all seem to work just fine. Comments and feedback welcomed.
Under Code Snippets, Internet Technology
Outliers – the Story of Success
Under Uncategorized
Bike maintenance
After attending the Bike Maintenance 101 class at Cahaba Cycles my son and I cleaned every bike in the house. It felt really good to walk away from a row of clean bikes, knowing that I can jump on and ride anytime without worry of weird failures. Riding a dirty bike is fun, but riding a clean bike is even better.
Under Uncategorized
Lenovo USB Keyboard
I have a couple of desktop machines that perform various services around the house. One is a Windows box, one is an old server that is used for experiments, etc. Using the random keyboards on those boxes was a PITA until I got my Lenovo USB Keyboard. This keyboard has:
If you’re going to use this keyboard on Windows XP, make sure you load the drivers from the Lenovo site. Linux seems to have everything built in. I’m afraid this keyboard isn’t manufactured any more.
Under Uncategorized
Free Tech Support again
It seems that it’s always Windows XP that shows up at my door. Two weeks ago, this laptop was eaten up with viruses. A quick Internet search (from my Linux box that has never had a virus) yielded the solution. A quick download later and the machine was clean enough to put back on the Internet. This week, the same computer was going to blue screen before the login page. WTF? How does it get that bad. The product key doesn’t work (It’s a Dell OEM product key), and I’m not sure what was done before I got it. I was able to repair windows, but now XP wants to be activated again. I’m tired of fooling with this one. I’m going to offer to load Ubuntu (heck, if I’m going to support something, it might as well be something I like using) or just give it back. There’s not much data on it, and all it’s used for is surfing and watching DVDs. Sounds like a great job for Ubuntu. There’s also the issue of the thank you. Anything will do, thank you note, case of diet coke, anything.
Under Uncategorized
Tour de Cure Just Around the Corner
More importantly, I’ve started my fundraising for this year’s TDC. The training for the ride is important, and serves as a great lead in for asking for donations. Doing time on the bike trainers and home gyms is not the most important part of Tour. The most important part is doing my part to cure this disease, and I can do that best by raising as much money as possible. My goal is $5000. I’m the rider recruitment chair for the Birmingham Tour de Cure. Don’t be surprised if you get a note or call from me asking you to join the Tour. I’ll ask you first to be a rider. If you don’t feel comfortable being a rider, I’ll gladly accept a donation. If you want to track my progress, just head on over to http://main.diabetes.org/goto/david.wilkins
Under Uncategorized
Looking for a new cell phone
I’ve decided to move away from brittle phones to rugged phones. The one I’ve got my eye on is the sonim xp3 quest. Some of the features are:
It’s doesn’t have 3G, or a touch screen, but it might last for more than a few months. If he just won’t lose it, I’ll be able to collect on the warranty at least.
Under Uncategorized
Mobile Internet Devices
These units are a bit small. The 4.3″ screen is about the size to build into a piece of modern furniture. I don’t think that screen would be something that I could read from across a medium sized room. Amazingly, this device sports WIFI, USB, and 3G. I wonder why the Nexus One costs $530, and this one costs $155? Sure, there are some processor differences, but not $400 worth!
Under Uncategorized
|