Hello Luis,
I have succeeded showing a single picture in the TWR-LCD-RGB and now I understand a little bit more how the code works. What I'm trying to do now is to graph a single ADC channel using the graph object from the eGUI widgets.
So first I created the graph object. About this, I would like to know if it is possible to draw a box around the grids or if I should use another object instead of the graph, in order to have the axis, the scales and the axis labels visible.
Then, what I want to do first is to graph the on-board potentiometer value, but I'm not sure how should I add the trace. This is what I have so far:
D4D_GRAPH_VALUE myTrace[200];
D4D_DECLARE_STD_GRAPH_BEGIN(Graph, NULL, 20, 136, 430, 100, 5, 7, 200, FONT_ARIAL7_HIGH, FONT_ARIAL7)
D4D_DECLARE_GRAPH_TRACE(myTrace, D4D_COLOR_BLACK, D4D_LINE_THIN, D4D_GRAPH_TRACE_TYPE_LINE)
D4D_DECLARE_GRAPH_END()
And then I declare the object in the screen:
D4D_DECLARE_STD_SCREEN_BEGIN(screen_Graph, ScreenGraph_)
D4D_DECLARE_SCREEN_OBJECT(Graph)
D4D_DECLARE_SCREEN_END()
I'm guessing I should add to myTrace[] the value of the ADC every time it is done, however it doesn't seem to be working if I call the ADC functions in the OnMain() function and add the acquired value using D4D_GraphAddTracesData (D4D_OBJECT_PTR pObj, D4D_GRAPH_VALUE *pValues).
Please, can you help me with this?
Regards,
Elisa