so the program complied using th varables.
Paint_DrawLine (120, 150, x_val_1 , y_val_1 , RED , DOT_PIXEL_2X2, LINE_STYLE_SOLID);
i can move the line by changing the numbers in the in the varables.
[code]
#include <SPI.h>
#include "LCD_Driver.h"
#include "GUI_Paint.h"
#include "image.h"
int sensorPin = A0; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor
int x_val_1 =120; // line end position
int y_val_1 =50;
void setup()
{
pinMode(ledPin, OUTPUT);
Config_Init();
LCD_Init();
LCD_SetBacklight(1000);
Paint_NewImage(LCD_WIDTH, LCD_HEIGHT, 0, BLACK);
Paint_Clear(BLACK);
// NEEDLE RED CENTER DOT
Paint_DrawCircle(120, 150, 10, RED , DOT_PIXEL_2X2, DRAW_FILL_FULL);
Paint_DrawCircle(120,150, 75, BLUE ,DOT_PIXEL_2X2,DRAW_FILL_EMPTY);
// GUAGE NUMBER LINES
Paint_DrawLine (40, 120, 60, 120, WHITE , DOT_PIXEL_2X2, LINE_STYLE_SOLID); //100 line
Paint_DrawLine (70, 70, 80, 80, WHITE , DOT_PIXEL_2X2, LINE_STYLE_SOLID); //150 line
Paint_DrawLine (120, 40, 120, 50, WHITE , DOT_PIXEL_2X2, LINE_STYLE_SOLID); //180 line
Paint_DrawLine (160, 80, 180, 70, WHITE, DOT_PIXEL_2X2, LINE_STYLE_SOLID); //210 line
Paint_DrawLine (170, 120, 190, 120, WHITE , DOT_PIXEL_2X2, LINE_STYLE_SOLID); // 250 line
// GUAGE LETTERING AND NUMBERS
//void Paint_DrawString_EN(UWORD Xstart, UWORD Ystart, const char * pString, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)
Paint_DrawString_EN(20, 120, "100", &Font20, BLACK, WHITE);
Paint_DrawString_EN(30, 50, "150", &Font20, BLACK, WHITE);
Paint_DrawString_EN(95, 15, "180", &Font20, BLACK, WHITE);
Paint_DrawString_EN(180, 50, "210", &Font20, BLACK, WHITE);
Paint_DrawString_EN(195, 120, "250", &Font20, BLACK, WHITE);
Paint_DrawString_EN(95, 180, "OIL", &Font24, BLACK, WHITE);
Paint_DrawString_EN(98, 202, "TEMP", &Font16, BLACK, WHITE);
Paint_DrawString_EN(115, 220, "F", &Font20, BLACK, WHITE);
Paint_DrawLine (120, 150, x_val_1 , y_val_1 , RED , DOT_PIXEL_2X2, LINE_STYLE_SOLID); // X- Y
//Paint_DrawLine(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, LINE_STYLE Line_Style , LINE_STYLE Line_Style)
// read the value from the sensor:
sensorValue = analogRead(sensorPin);
// turn the ledPin on
digitalWrite(ledPin, HIGH);
// stop the program for <sensorValue> milliseconds:
delay(sensorValue);
// turn the ledPin off:
digitalWrite(ledPin, LOW);
// stop the program for for <sensorValue> milliseconds:
delay(sensorValue);
}
void loop()
{
}
/*********************************************************************************************************
END FILE
*********************************************************************************************************/
[/code]