I have a really good idea for a project that could be done with my current (few chapters in) knowledge of GTK. It's work related (again) but it's something I could actually use.
I have this National Instruments USB DO device that I want to use to sent pulses to the digital input part of my system here. Specifically, digital words triggered by a strobe pulse. My company has an SDK for doing this (basically pass a number and it does all the hard work for you). I'd like to make a UI over that with buttons for each bit in the word (MSB->LSB) that can be toggled, and then have one more button to transmit that number. So, graphically it would be binary and then I'd pass the value (in decimal) to the SDK.
Why not just enter a number to transmit? Because I keep finding myself needing to test things bit by bit, and I want to learn how to create buttons and callback functions and whatever.
Each button would need to have a callback function that does two things: toggle the color of the button (default gray to green and vice-versa)as well as increment/decrement the sum of the buttons. So, the third bit would add/subtract 4 depending on the toggle state. This SHOULD be fairly simple.
Should be..........dotdotdot
No comments:
Post a Comment