January 12th, 2013, 09:32 PM
Which module to use to record value change over time?
Here is my task. I have a Rasberry PI connected to 2 servo-motors. I want to develop a GUI application which will contain nothing but a record button and 2 slders of Tkinter. Now what I want to do is I want to have a record button which, after being pressed will record all the value changes of the sliders over time of the app. So it will be almost like animating/automatng
This will give me a value over time change. Now I will apply those values to the servomotor and thus they will reproduce the movement based on the recorded values over time. My question is which module do I use to do so?
January 13th, 2013, 03:02 PM
The toplevel tkinter widgets (if a toplevel is a widget, that is) have an "after" method. The delay, as i recall, is in milliseconds. The function called by the after method could record data then reinstall itself.
[/code] are essential for python code and Makefiles!
January 29th, 2013, 10:45 PM
You might have to write data to a file with a time stamp attached.
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25
January 30th, 2013, 12:16 PM
You will first have to decide how often you want to test for a value change. Usually some experimenting gets close enough. You can then sample every 0.00X seconds, and save (however you wish) the time and the event. It does not matter if you save the clock time or the difference since the start since difference can be easily calculated. Note that Python can get time down to the micro-second on Linux, but only?? 1000th of a second on Windows. Show us some code to work with for more detailed info.