Author Archives: Chris Heydrick

Drawing a bounding box over an image with C#/.net and WinForms

Most of the info in this post can be found between the following two links: http://stackoverflow.com/questions/2065162/filled-rubber-band-in-winforms-application https://msdn.microsoft.com/en-us/library/3t7htc9c(v=vs.110).aspx Drawing a bounding box over an image to select a region took me longer to figure out than I expected. Here’s a brief bare-bones … Continue reading

Posted in Uncategorized | Leave a comment

Control a power strip with an Arduino

I’m running some tests at the office that require cycling the power to a device. After spending a few days doing this manually by flipping the switch on a power strip, I started searching for a better way. Some Googling … Continue reading

Posted in Uncategorized | 1 Comment

Passing a ctypes array of struct from Python to .dll

I’m working on a small project that requires interfacing Python to a C .dll. I’ve never had to pass an array of structures by reference before with ctypes, so here’s a quick sanity check I did to make sure I … Continue reading

Posted in Hobbies, Programming, Technology | Leave a comment

ADXL335 Accelerometer on an Arduino

I picked up an ADXL335 accelerometer in a packaging designed to fit onto a solder-less breadboard so that I could interface it to my Arduino. I had a few time-consuming problems interfacing with it because I’m not used to reading chip … Continue reading

Posted in Uncategorized | Tagged | 24 Comments

Brief Example of Calling .dll Functions in C#

I don’t like C#, but the free version of Visual Studio only lets you use the interface builder in C#/.net programs, so here we are. My goal was to cheat and write the interesting parts of the program in C/C++, … Continue reading

Posted in Hobbies, Programming, Technology | Tagged , | Leave a comment

C# Struct Sizes

I’ve been banging my head against trying to get C# to talk to a .dll written in straight C for the past few days. I finally got a grip on passing basic data types, and pointers to basic data types, … Continue reading

Posted in Uncategorized | Leave a comment

File Open Dialog Box in Python

I’m putting the finishing touches on a side project at work that requires opening a file as an argument at the command line, or through a file open dialog box. Here’s a snippet that demonstrates how I implemented it.   … Continue reading

Posted in Programming | Leave a comment

FlightGear panic button with an Arduino

I like flight simulators, but I’m not very good at them. What I need is a panic button that puts me at a safe altitude for recovery. Fortunately the flight simulator I’m playing right now, FlightGear, has a way to … Continue reading

Posted in Hobbies, Programming, Technology | Leave a comment

How to revive a dead character in Baldur’s Gate:EE

This took me forever to figure out. Xzar died on me early in the game and I couldn’t figure out how to revive him at a temple (which is what a few Internet sources said to do). You must go … Continue reading

Posted in Technology | 1 Comment

How to read serial data from an Arduino in Linux with C: Part 4

Parts one, two, and three dealt with non-canonical reading of serial data coming from an Arduino. Part 4 is how to do it in canonical mode. I programmed the Arduino to wait until it receives a byte from the PC and … Continue reading

Posted in Hobbies, Programming | 14 Comments