
C Sharp Development 101 – Part 2: Toolbox Controls



If you’ve ever designed an embedded system with at least one button you’ve had to deal with button debouncing. This is also know as contact bounce, a phenomenon where a button press can be registered as multiple button presses if not handled correctly. One way to take care of this is with a hardware filter built from a resistor-capacitor setup, or by using a couple of NAND gates. We find that [Jack Ganssle] put together the most comprehensive and approachable look at contact bounce which you should read through if you want to learn more.
We’re interested in software solutions for debouncing buttons. This seems to be one of the most common forum questions but it can be hard to find answers in the form of reliable code examples. Do you have debounce code that you depend on in every application? Are you willing to share it with the world? We’d like to gather as many examples as possible and publish them in one-post-to-rule-them-all.
Here’s some guidelines to follow:
As an example we’ve included one of our favorite sets of debounce code after the break. Please note how it follows the guidelines listed above.

In this tutorial we are going to get up close with the Visual Studio 2010 environment. We will learn how to make a console application as well as a form to display our hello world applications. This will give us an opportunity to view 2 types of solutions of the many available in Visual Studio. We will start making the console application first then progress to the forms application.
First we must understand the development environment we are going to use. On the far left side is the toolbox panel. This panel gives us access to a lot of controls that can be used by the Windows Forms. Next is the Solution Explorer that will allow us to navigate the projects and files we are going to create in this Solution. The Properties panel is directly under my Solution Explorer and will allow us to change properties of controls and of the form we will create later on. If any of these are not being displayed they can be retrieved from the View menu at the top under Other Windows. For more information on the Visual Studio IDE visit MSDN and search for the specific questions you are having.
Continue reading “C Sharp Development 101 – Part 1: Hello World”

[StaticChanger] built a scoreboard to display his kill statistics from Halo for the PC. Yes, we’ve seen kill counters before, but we like the way that he gathers the data. This project is reading the score directly from an address in memory.
Using a program called Cheat Engine, the memory used by a program can be sniffed. After a few passes, the program will help you find a static memory address for your desired data. Once you have that it’s just a matter of using a pointer to that address in your desired programming language. In this case, a C# program polls the value and instructs an Arduino to display the value on a couple of 7-segment displays. Voila, the number appears next to your screen as you see in the image above.


[Keba] not only asked Answeres.HackaDay.com, but also sent us an email as follows.
“Can you make a basic guide to designing a good Command Line User Interface?”
Wouldn’t you know the luck, I’m currently working on a Command Line type interface for a project of mine. While after the jump I’ll be walking through my explanation, it should be noted that the other replies to Answers.HackaDay.com are also great suggestions.
Continue reading “So You Want To Make A Command Line Interface”

[Simon Inns] is still hard at work making USB connectivity for PIC microcontrollers easier for the hobbiest. He’s released a framework for PIC based USB devices under Windows. It includes the firmware needed for USB compatible 18F PIC chips as well as a C# class library and example programs for the Windows side of things. This goes quite a bit further than his PIC-USB tutorial but with little added effort on your end of things.
We do our USB prototyping on a breadboard just like [Simon] did in this example. He’s got a nice little USB-B connector breakout that is easy to plug into the breadboard. If you prefer to have a more stable development area, check out the one he designed. It’s a single-sided PCB made for through-hole components with just a handful of jumper wires.