User Manual
}
}
if ((ball_Y <= ball_rad) || (ball_Y >= (oled.getLCDHeight() - ball_rad - 1)))
{
ballVelocityY = -ballVelocityY;
}
paddle0_Y += paddle0Velocity;
paddle1_Y += paddle1Velocity;
if ((paddle0_Y <= 1) || (paddle0_Y > oled.getLCDHeight() - 2 - paddleH))
{
paddle0Velocity = -paddle0Velocity;
}
if ((paddle1_Y <= 1) || (paddle1_Y > oled.getLCDHeight() - 2 - paddleH))
{
paddle1Velocity = -paddle1Velocity;
}
oled.clear(PAGE);
oled.rect(0, 0, oled.getLCDWidth() - 1, oled.getLCDHeight());
oled.rectFill(oled.getLCDWidth()/2 - 1, 0, 2, oled.getLCDHeight());
oled.rectFill(paddle0_X, paddle0_Y, paddleW, paddleH);
oled.rectFill(paddle1_X, paddle1_Y, paddleW, paddleH);
oled.circle(ball_X, ball_Y, ball_rad);
oled.display();
delay(25);
}
delay(1000);
}
void textExamples()
{
printTitle("Text!", 1);
oled.clear(PAGE);
oled.setFontType(0);
oled.setCursor(0, 0);
for (int i=0; i<=255; i++)
{
11/17