some problem i try speed at 19200 or 115200 and some problem master
void setup()
{
Serial.begin(19200);
}
void loop()
{
Serial.println(“test”);
delay(100);
}
and slave
#include
#include
#include
#define W 128
#define H 98
TVout tv;
pollserial pserial;
void setup() {
tv.begin(PAL, W, H);
tv.set_hbi_hook(pserial.begin(19200));
initOverlay();
tv.select_font(font4x6);
tv.fill(0);
}
// 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())
{
char c = pserial.read();
pserial.print(c);
}
}