Whenever I try to display characters on the screen not all of them will show up. Instead they are replaced by strange characters like in the provided picture. I have also provided the code that I am using to write the ttext to the screen. Any help would be appreciated.
#include
#include
#include
#define W 136
#define H 96
TVout tv;
pollserial pserial;
char saveChar;
int index = 0;
void setup() {
tv.begin(NTSC, W, H);
initOverlay();
tv.select_font(font6x8);
tv.fill(0);
randomSeed(analogRead(0));
tv.set_hbi_hook(pserial.begin(57600));
}
// 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() {
if (pserial.available()) {
tv.print((char)pserial.read());
}
}