Hi. Have been working with arduino for 1 year now and made a couple of projects successfully. that's all god so far.
but me new project really gives me trouble.
Iv'e bought myself 1 video experimenter kit for use with my home built underwater ROW.
now I want to have a text scrolling fourth and back in the bottom of my video feed using an analog value as a guideline.
the whole text string is as follows but only 20 letters or so will be visible at one time:
....N..........NW.........W..........SW.........S..........SE.........E..........NE.........
I would like to map this to an analog value of 0 to 359 as that is what i expect returning from my digital compass.
the code i have is from the demo overlay for the kit and i feel that it's a starting point but not sure how to get it right:
#include <TVout.h>
#include <fontALL.h>
#define W 136
#define H 96
TVout tv;
unsigned char x,y;
unsigned char originx = 5;
unsigned char originy = 80;
unsigned char plotx = originx;
unsigned char ploty = 40;
char s[32];
unsigned int n = 0;
int index = 0;
int messageLen = 92;
char message[] = "....N..........NW.........W..........SW.........S..........SE.........E..........NE.........";
char saveChar;
void setup()Â {
 tv.begin(PAL, W, H);
 initOverlay();
 tv.select_font(font6x8);
 tv.fill(0);
 drawGraph();
}
// Initialize ATMega registers for video overlay capability.
// Must be called after tv.begin().
void initOverlay() {
 TCCR1A = 0;
 // Enable timer1. ICES0 is set to 0 for falling edge detection on input capture pin.
 TCCR1B = _BV(CS10);
 // Enable input capture interrupt
 TIMSK1 |= _BV(ICIE1);
 // Enable external interrupt INT0 on pin 2 with falling edge.
 EIMSK = _BV(INT0);
 EICRA = _BV(ISC11);
}
// Required to reset the scan line when the vertical sync occurs
ISR(INT0_vect) {
 display.scanLine = 0;
}
void loop() {
 saveChar = message[index+22];
 message[index+22] = '\0';
 for(int x=6;x>=0;x--) {
  if (x<6) {
   tv.delay_frame(1);
  }
  tv.print(x, 87, message+index);
  for(byte y=87;y<96;y++) {
   tv.draw_line(0, y, 5, y, 0);
   tv.draw_line(128, y, 134, y, 0);
  }
 }
 message[index+22] = saveChar;   // here the print out of the text begins but how to get it scrolling fourth and back and even stop when alignet to input ???
 index++;
 if (index > 92) {
  index = 0;
 }
Â
}
void drawGraph() {
 tv.draw_line(originx, 15, originx, originy, 1);
 tv.draw_line(originx, originy, 120, originy, 1);
 for(byte y=originy;y>15;y -= 4) {
  tv.set_pixel(originx-1, y, 1);
  tv.set_pixel(originx-2, y, 1);
 }
 for(byte x=originx;x<120;x += 4) {
  tv.set_pixel(x, originy+1, 1);
  tv.set_pixel(x, originy+2, 1);
 }
}
I would really appreciated some help here.... feel rather stock with this
Best regards