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 | Leave a 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 | 11 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