Arduino BreakOut with composite TV output
Classic BreakOut Arcade with Arduino Nano/Uno/Pro/Pro Mini etc. and Composite TV Out. Easy project for beginners with tutorial!
Components and supplies
1
Speaker: 0.25W, 8 ohms
1
Rotary potentiometer (generic)
1
Resistor 1k ohm
1
Arduino UNO
1
Through Hole Resistor, 470 ohm
1
Pushbutton Switch, Momentary
Tools and machines
1
Breadboard, 170 Pin
1
Soldering iron (generic)
Project description
Code
Arduino Code
arduino
1/************************************************************************** 2 * 3 * ARDUINO BREAKOUT 4 * 5 * Jan/2022 Giovanni Verrua 6 * 7 * This program is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program. If not, see <https://www.gnu.org/licenses/>. 19 * 20 * Hardware: 21 * 22 * D9 --[ 1 k ohm resistor]--+--> (+)TVout(-) <-+ 23 * D7 --[ 470 ohm resistor]--+ | 24 * GND------------------------------------------+ 25 * 26 * +5V --- POTENTIOMETER ----- GND 27 * 100 kohm 28 * | 29 * A0 -----------+ 30 * 31 * D12 ------ PUSH BUTTON ----- GND 32 * 33 * D11 -------- SPEAKER ------- GND 34 * 35 **************************************************************************/ 36 37#include <TVout.h> 38#include "bitmap.h" 39#include <fontALL.h> 40 41//#define DEBUG_ON 42 43#define BUTTON_START 12 //digital 12 - button 44#define WHEEL_MOVE A0 //Analog A0 - potentiometer 45 46 47#define BAT_Y_POS 78 //THE BAT MUST BE 2 PIXEL HIGH, THE TWO LAST ROWS OF THE BMP 48 49#define TXT_Y_POS 90 //Lives and Score position 50 51#define BRK_Y_POS 4 //Bricks initial Y Position 52#define BRK_X_POS 1 //Bricks initial X Position 53 54#define BAL_X_MIN 1 //ball min. X Position 55#define BAL_X_MAX 125 //ball max. X Position 56#define BAL_Y_MIN 0 //ball min. Y Position 57#define BAL_Y_MAX BAT_Y_POS+8 //ball max. Y Position 58 59#define BAT_Y_POS 79 //bat fixed Y position 60 61TVout TV; 62 63int gamSt = 0; //0 = menu, 1 = in game, 2 = game over 64 65 66int batPosX = 0; //bat position 67int batOldX = 0; //bat old position 68 69int balPosX = 0; //ball X position 70int balPosY = 0; //ball Y position 71 72//----------------------------------------------------------------------------GAME SETUP---| 73#define BAL_SPEED 25 //BALL initial speed higher value, slower ball 74#define NUM_LIVES 5 //balls to play 75 76//if you want to change the bat width, change te following part. 77//NOTE THAT YOU COULD NEED TO SLIGHTLY MODIFY THE RATIO_WHEEL, DEPENDING ON 78//YOUR ARDUINO BOARD AND POTENTIOMETER. 79 80#define RATIO_WHEEL 8.65 //7.65 //Ratio Video X resolution Vs. potentiometer resolution 81 //the lower the value, the more the bat will go on the right 82#define BAT_SIZE 8 83#define BAT_SHAPE bat8 //bitmap 8 pixels width (bat) 84#define BNN_SHAPE bnn8 //bitmap 8 pixels width (delete bat) 85 86//#define RATIO_WHEEL 8.95 //Ratio Video X resolution Vs. potentiometer resolution 87 //the lower the value, the more the bat will go on the right 88//#define BAT_SIZE 16 89//#define BAT_SHAPE bat16 //bitmap 16 pixels width (bat) 90//#define BNN_SHAPE bnn16 //bitmap 16 pixels width (delete bat) 91//-----------------------------------------------------------------------------------------| 92 93 94int balDirX = 1; //ball X direction (1 ; -1) 95int balDirY = 1; //ball Y direction (1 ; -1) 96int balsped = BAL_SPEED ; //ball initial speed 97 98 99//bricks matrix at level begin - 4...2 full brick, 1 = half brick, 0 = no brick 100int bMatrix[4][14] = { {4,4,4,4,4,4,4,4,4,4,4,4,4,4}, 101 {4,4,4,4,4,4,4,4,4,4,4,4,4,4}, 102 {4,4,4,4,4,4,4,4,4,4,4,4,4,4}, 103 {4,4,4,4,4,4,4,4,4,4,4,4,4,4} }; 104 105 106//===================================================================================== RESET_BRICKS 107void reset_bricks() { 108 109 bMatrix[0][0]=4; bMatrix[0][1]=4; bMatrix[0][2]=4; bMatrix[0][3]=4; bMatrix[0][4]=4; bMatrix[0][5]=4; bMatrix[0][6]=4; bMatrix[0][7]=4; bMatrix[0][8]=4; bMatrix[0][9]=4; bMatrix[0][10]=4; bMatrix[0][11]=4; bMatrix[0][12]=4; bMatrix[0][13]=4; 110 bMatrix[1][0]=4; bMatrix[1][1]=4; bMatrix[1][2]=4; bMatrix[1][3]=4; bMatrix[1][4]=4; bMatrix[1][5]=4; bMatrix[1][6]=4; bMatrix[1][7]=4; bMatrix[1][8]=4; bMatrix[1][9]=4; bMatrix[1][10]=4; bMatrix[1][11]=4; bMatrix[1][12]=4; bMatrix[1][13]=4; 111 bMatrix[2][0]=4; bMatrix[2][1]=4; bMatrix[2][2]=4; bMatrix[2][3]=4; bMatrix[2][4]=4; bMatrix[2][5]=4; bMatrix[2][6]=4; bMatrix[2][7]=4; bMatrix[2][8]=4; bMatrix[2][9]=4; bMatrix[2][10]=4; bMatrix[2][11]=4; bMatrix[2][12]=4; bMatrix[2][13]=4; 112 bMatrix[3][0]=4; bMatrix[3][1]=4; bMatrix[3][2]=4; bMatrix[3][3]=4; bMatrix[3][4]=4; bMatrix[3][5]=4; bMatrix[3][6]=4; bMatrix[3][7]=4; bMatrix[3][8]=4; bMatrix[3][9]=4; bMatrix[3][10]=4; bMatrix[3][11]=4; bMatrix[3][12]=4; bMatrix[3][13]=4; 113} 114 115 116//===================================================================================== DRAW_BRICKS 117int draw_bricks() { 118 119 int valret = 0 ; 120 121 122 for (int j=0;j<4;j++) { 123 for (int i=0;i<14;i++) { 124 125 if (bMatrix[j][i] >0) valret++; 126 127 if (bMatrix[j][i] == 4) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk4); 128 if (bMatrix[j][i] == 3) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk3); 129 if (bMatrix[j][i] == 2) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk2); 130 if (bMatrix[j][i] == 1) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk1); 131 if (bMatrix[j][i] == 0) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk0); //blank (no brick) 132 133 } 134 } 135 return valret; //How many bricks left to break 136} 137 138//===================================================================================== SETUP 139void setup() { 140 141 TV.begin(_PAL); //128x96 default 142 143 pinMode(WHEEL_MOVE,INPUT); 144 pinMode(BUTTON_START,INPUT_PULLUP); 145 146} 147 148//===================================================================================== LOOP 149void loop() { 150 151 unsigned long mill = millis() ; //delay ball 152 153 int batMove = 0; 154 int butStart = 1; 155 int Score = 0; 156 int lives = NUM_LIVES; 157 int shpMove = 0; 158 int shpPosX = 0; 159 160 //-----------------------------------------------------------------------------------------------------MENU 161 162 if (gamSt == 0){ //MENU 163 164 TV.clear_screen(); 165 TV.bitmap(0, 0, logo); 166 TV.bitmap(0, 32, start); 167 delay(500); 168 169 butStart = 1; 170 while ( butStart == 1){ 171 butStart = digitalRead(BUTTON_START); 172 } 173 174 Score = 0; 175 lives = NUM_LIVES; 176 gamSt = 1; 177 } 178 179 180 //-----------------------------------------------------------------------------------------------------IN GAME 181 182 while (gamSt == 1) { // IN GAME 183 184 185 //Score = 0; NOT HERE! 186 //lives = NUM_LIVES; NOT HERE! 187 188 batMove = analogRead(WHEEL_MOVE); //bat move 189 batPosX = batMove / RATIO_WHEEL ; 190 batOldX = batPosX ; 191 192 TV.clear_screen(); 193 reset_bricks() ; 194 int bricksleft = draw_bricks(); 195 TV.bitmap(batPosX, BAT_Y_POS, BAT_SHAPE); 196 TV.select_font(font4x6); 197 TV.draw_line(0,TXT_Y_POS-2,127,TXT_Y_POS-2,WHITE); 198 TV.print(122,TXT_Y_POS,lives); 199 TV.print( 0,TXT_Y_POS,Score); 200 delay(1000); 201 202 balPosX = batPosX + BAT_SIZE/2 ; //ball X position 203 balPosY = BAT_Y_POS-1; //ball Y position 204 balDirX = 1; //ball X direction (1 ; -1) 205 balDirY = -1; //ball Y direction (1 ; -1) 206 balsped = BAL_SPEED ; //ball initial speed 207 mill = millis() ; 208 209 //-----------------------------------------------------------------------------------------------------Main Cycle-begin 210 211 while (gamSt == 1 && bricksleft >0) { 212 213 214 //-------------------------------------------------------------Bat-begin- 215 216 batMove = analogRead(WHEEL_MOVE); //bat move 217 218 batPosX = batMove / RATIO_WHEEL ; 219 220 if (batPosX -1 == batOldX || batPosX + 1 == batOldX) batPosX = batOldX; //Avoiding flickering 221 222 if (batOldX != batPosX) { 223 TV.bitmap(batOldX, BAT_Y_POS, BNN_SHAPE); 224 TV.bitmap(batPosX, BAT_Y_POS, BAT_SHAPE); 225 batOldX = batPosX; 226 } 227 228 //-------------------------------------------------------------Bat-end--- 229 230 231 //-------------------------------------------------------------Ball-move- 232 233 if ( mill + balsped < millis() ) { 234 235 TV.select_font(font4x6); 236 TV.draw_line(0,TXT_Y_POS-2,127,TXT_Y_POS-2,WHITE); 237 TV.print(122,TXT_Y_POS,lives); 238 TV.print( 0,TXT_Y_POS,Score); 239 240 TV.set_pixel(balPosX,balPosY,BLACK); //before to redraw the bricks 241 242 if ( TV.get_pixel( balPosX+balDirX , balPosY+balDirY ) == WHITE ) { 243 244 if (balPosY < 36+BRK_Y_POS){ //hit a brick 245 246 int brickX = (int)( (balPosX+balDirX-BRK_X_POS ) / 9 ); 247 int brickY = (int)( (balPosY+balDirY-BRK_Y_POS ) / 9 ); 248 249 bMatrix[brickY][brickX] -= 1; 250 if (bMatrix[brickY][brickX] > 0) TV.tone(2000,50); else TV.tone(3000,50); 251 252 bricksleft = draw_bricks(); 253 254 //like in the original game, after 4 bricks broken the ball goes faster 255 if (bricksleft +3 < 14*4 && balsped == BAL_SPEED) balsped -= 10; //14*4 = total bricks 256 257 Score++; 258 259 TV.print( 0,TXT_Y_POS,Score); 260 261 //if the balPosX starting from 1 -instead of 0- can be divided by 9, means the ball is in the empty column between two bricks. 262 //so it will change the X direction instead of Y 263 if ( (balPosX-BRK_X_POS+1) % 9 == 0) { 264 balDirX *= -1; 265 } 266 else { 267 balDirY *= -1; 268 } 269 270 } 271 else if (balPosY < BAL_Y_MAX) { //the ball hit the bat 272 273 //if the bat hit the ball with the lateral side, the ball get a bigger angle and come back from the incoming direction 274 if (balPosX+balDirX == batPosX) balDirX =-2; 275 else if (balPosX+balDirX == batPosX + BAT_SIZE -1) balDirX = 2; 276 else if (balDirX ==2 || balDirX == -2) balDirX = balDirX /2; 277 278 279 balDirY =-1; 280 281 TV.tone(1000,50); 282 } 283 284 } 285 else { //the ball hit nothing 286 if (balPosX + balDirX > BAL_X_MAX || balPosX + balDirX < BAL_X_MIN) {balDirX *= -1;} 287 if (balPosY + balDirY < BAL_Y_MIN) {balDirY *= -1;} 288 289 if (balPosY >= BAL_Y_MAX) { //missed ball 290 291 TV.set_pixel(balPosX,balPosY,BLACK); //remove this line if you don't like to see the black dot on the white line where the ball gone out. 292 293 #ifdef DEBUG_ON 294 balDirY = -1; 295 #else 296 lives--; 297 298 TV.tone(200,500); 299 delay(2000); 300 301 TV.print(122,TXT_Y_POS,lives); 302 303 balPosX = batPosX + BAT_SIZE/2 ; //ball X position 304 balPosY = BAT_Y_POS-1; //ball Y position 305 balDirX = 1; //ball X direction (1 ; -1) 306 balDirY = -1; //ball Y direction (1 ; -1) 307 #endif 308 309 if (lives == 0) { 310 gamSt = 2; 311 TV.tone(500,50); delay(60); 312 TV.tone(400,50); delay(60); 313 TV.tone(300,50); delay(60); 314 TV.tone(200,50); delay(60); 315 TV.tone(100,50); delay(60); 316 } 317 318 } 319 320 } 321 322 if (balPosY == 45+BRK_Y_POS) draw_bricks(); //needed to refresh the bricks from garbage that sometimes appears 323 324 //TV.set_pixel(balPosX,balPosY,BLACK); //must to be done before to redraw the bricks to avoid the garbage 325 balPosX += balDirX; 326 balPosY += balDirY; 327 TV.set_pixel(balPosX,balPosY,WHITE); 328 329 mill = millis() ; 330 } 331 332 333 //-----------------------------------------------------------------------------------------------------Main Cycle-end--- / 334 335 } //while gamest == 1 and bricksleft >0 336 337 } //while (gamSt == 1) 338 339 //-----------------------------------------------------------------------------------------------------GAME OVER 340 if (gamSt == 2){ //GAME OVER 341 gamSt = 0; 342 TV.clear_screen(); 343 TV.bitmap(0, 0, logo); 344 TV.bitmap(0, 32, over); 345 TV.select_font(font6x8); 346 TV.print(40,TXT_Y_POS,"SCORE:"); 347 TV.print(76,TXT_Y_POS,Score); 348 349 delay(1000); 350 351 butStart = 1; 352 while ( butStart == 1){ 353 butStart = digitalRead(BUTTON_START); //cannon shot 354 } 355 } //if (gamSt == 2) 356 } //loop 357
Arduino Code
arduino
1/************************************************************************** 2 3 * 4 * ARDUINO BREAKOUT 5 * 6 * Jan/2022 Giovanni Verrua 7 * 8 * 9 This program is free software: you can redistribute it and/or modify 10 * it 11 under the terms of the GNU General Public License as published by 12 * the Free 13 Software Foundation, either version 3 of the License, or 14 * (at your option) 15 any later version. 16 * 17 * This program is distributed in the hope that it 18 will be useful, 19 * but WITHOUT ANY WARRANTY; without even the implied warranty 20 of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU 23 General Public License for more details. 24 * 25 * You should have received 26 a copy of the GNU General Public License 27 * along with this program. If not, 28 see <https://www.gnu.org/licenses/>. 29 * 30 * Hardware: 31 * 32 * D9 --[ 33 1 k ohm resistor]--+--> (+)TVout(-) <-+ 34 * D7 --[ 470 ohm resistor]--+ | 35 36 * GND------------------------------------------+ 37 * 38 * +5V --- POTENTIOMETER 39 ----- GND 40 * 100 kohm 41 * | 42 * A0 -----------+ 43 44 * 45 * D12 ------ PUSH BUTTON ----- GND 46 * 47 * D11 -------- SPEAKER 48 ------- GND 49 * 50 **************************************************************************/ 51 52#include 53 <TVout.h> 54#include "bitmap.h" 55#include <fontALL.h> 56 57//#define DEBUG_ON 58 59#define 60 BUTTON_START 12 //digital 12 - button 61#define WHEEL_MOVE A0 //Analog A0 62 - potentiometer 63 64 65#define BAT_Y_POS 78 //THE BAT MUST BE 2 PIXEL HIGH, 66 THE TWO LAST ROWS OF THE BMP 67 68#define TXT_Y_POS 90 //Lives and Score position 69 70#define 71 BRK_Y_POS 4 //Bricks initial Y Position 72#define BRK_X_POS 1 //Bricks 73 initial X Position 74 75#define BAL_X_MIN 1 //ball min. X Position 76#define 77 BAL_X_MAX 125 //ball max. X Position 78#define BAL_Y_MIN 0 //ball 79 min. Y Position 80#define BAL_Y_MAX BAT_Y_POS+8 //ball max. Y Position 81 82 83#define BAT_Y_POS 79 //bat fixed Y position 84 85TVout TV; 86 87int 88 gamSt = 0; //0 = menu, 1 = in game, 2 = game over 89 90 91int batPosX = 0; //bat 92 position 93int batOldX = 0; //bat old position 94 95int balPosX = 0; //ball X 96 position 97int balPosY = 0; //ball Y position 98 99//----------------------------------------------------------------------------GAME 100 SETUP---| 101#define BAL_SPEED 25 //BALL initial speed higher value, slower 102 ball 103#define NUM_LIVES 5 //balls to play 104 105//if you want to change 106 the bat width, change te following part. 107//NOTE THAT YOU COULD NEED TO SLIGHTLY 108 MODIFY THE RATIO_WHEEL, DEPENDING ON 109//YOUR ARDUINO BOARD AND POTENTIOMETER. 110 111 112#define RATIO_WHEEL 8.65 //7.65 //Ratio Video X resolution Vs. potentiometer 113 resolution 114 //the lower the value, the more 115 the bat will go on the right 116#define BAT_SIZE 8 117#define BAT_SHAPE bat8 118 //bitmap 8 pixels width (bat) 119#define BNN_SHAPE bnn8 //bitmap 8 pixels width 120 (delete bat) 121 122//#define RATIO_WHEEL 8.95 //Ratio Video X resolution Vs. 123 potentiometer resolution 124 //the lower the value, 125 the more the bat will go on the right 126//#define BAT_SIZE 16 127//#define 128 BAT_SHAPE bat16 //bitmap 16 pixels width (bat) 129//#define BNN_SHAPE bnn16 //bitmap 130 16 pixels width (delete bat) 131//-----------------------------------------------------------------------------------------| 132 133 134int 135 balDirX = 1; //ball X direction (1 ; -1) 136int balDirY = 1; //ball Y direction 137 (1 ; -1) 138int balsped = BAL_SPEED ; //ball initial speed 139 140 141//bricks 142 matrix at level begin - 4...2 full brick, 1 = half brick, 0 = no brick 143int bMatrix[4][14] 144 = { {4,4,4,4,4,4,4,4,4,4,4,4,4,4}, 145 {4,4,4,4,4,4,4,4,4,4,4,4,4,4}, 146 147 {4,4,4,4,4,4,4,4,4,4,4,4,4,4}, 148 {4,4,4,4,4,4,4,4,4,4,4,4,4,4} 149 }; 150 151 152//===================================================================================== 153 RESET_BRICKS 154void reset_bricks() { 155 156 bMatrix[0][0]=4; bMatrix[0][1]=4; 157 bMatrix[0][2]=4; bMatrix[0][3]=4; bMatrix[0][4]=4; bMatrix[0][5]=4; bMatrix[0][6]=4; 158 bMatrix[0][7]=4; bMatrix[0][8]=4; bMatrix[0][9]=4; bMatrix[0][10]=4; bMatrix[0][11]=4; 159 bMatrix[0][12]=4; bMatrix[0][13]=4; 160 bMatrix[1][0]=4; bMatrix[1][1]=4; bMatrix[1][2]=4; 161 bMatrix[1][3]=4; bMatrix[1][4]=4; bMatrix[1][5]=4; bMatrix[1][6]=4; bMatrix[1][7]=4; 162 bMatrix[1][8]=4; bMatrix[1][9]=4; bMatrix[1][10]=4; bMatrix[1][11]=4; bMatrix[1][12]=4; 163 bMatrix[1][13]=4; 164 bMatrix[2][0]=4; bMatrix[2][1]=4; bMatrix[2][2]=4; bMatrix[2][3]=4; 165 bMatrix[2][4]=4; bMatrix[2][5]=4; bMatrix[2][6]=4; bMatrix[2][7]=4; bMatrix[2][8]=4; 166 bMatrix[2][9]=4; bMatrix[2][10]=4; bMatrix[2][11]=4; bMatrix[2][12]=4; bMatrix[2][13]=4; 167 168 bMatrix[3][0]=4; bMatrix[3][1]=4; bMatrix[3][2]=4; bMatrix[3][3]=4; bMatrix[3][4]=4; 169 bMatrix[3][5]=4; bMatrix[3][6]=4; bMatrix[3][7]=4; bMatrix[3][8]=4; bMatrix[3][9]=4; 170 bMatrix[3][10]=4; bMatrix[3][11]=4; bMatrix[3][12]=4; bMatrix[3][13]=4; 171} 172 173 174//===================================================================================== 175 DRAW_BRICKS 176int draw_bricks() { 177 178 int valret = 0 ; 179 180 181 182 for (int j=0;j<4;j++) { 183 for (int i=0;i<14;i++) { 184 185 186 if (bMatrix[j][i] >0) valret++; 187 188 if (bMatrix[j][i] 189 == 4) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk4); 190 if (bMatrix[j][i] 191 == 3) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk3); 192 if (bMatrix[j][i] 193 == 2) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk2); 194 if (bMatrix[j][i] 195 == 1) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk1); 196 if (bMatrix[j][i] 197 == 0) TV.bitmap(BRK_X_POS+(i*9),BRK_Y_POS+(j*9),bk0); //blank (no brick) 198 199 200 } 201 } 202 return valret; //How many bricks left to break 203 204} 205 206//===================================================================================== 207 SETUP 208void setup() { 209 210 TV.begin(_PAL); //128x96 default 211 212 pinMode(WHEEL_MOVE,INPUT); 213 214 pinMode(BUTTON_START,INPUT_PULLUP); 215 216} 217 218//===================================================================================== 219 LOOP 220void loop() { 221 222 unsigned long mill = millis() ; //delay ball 223 224 225 int batMove = 0; 226 int butStart = 1; 227 int Score = 0; 228 int lives 229 = NUM_LIVES; 230 int shpMove = 0; 231 int shpPosX = 0; 232 233 //-----------------------------------------------------------------------------------------------------MENU 234 235 236 if (gamSt == 0){ //MENU 237 238 TV.clear_screen(); 239 240 TV.bitmap(0, 0, logo); 241 TV.bitmap(0, 32, start); 242 243 delay(500); 244 245 butStart = 1; 246 while ( 247 butStart == 1){ 248 butStart = digitalRead(BUTTON_START); 249 250 } 251 252 Score = 0; 253 lives = NUM_LIVES; 254 255 gamSt = 1; 256 } 257 258 259 //-----------------------------------------------------------------------------------------------------IN 260 GAME 261 262 while (gamSt == 1) { // IN GAME 263 264 265 //Score 266 = 0; NOT HERE! 267 //lives = NUM_LIVES; NOT HERE! 268 269 batMove 270 = analogRead(WHEEL_MOVE); //bat move 271 batPosX = batMove / RATIO_WHEEL 272 ; 273 batOldX = batPosX ; 274 275 TV.clear_screen(); 276 277 reset_bricks() ; 278 int bricksleft = draw_bricks(); 279 TV.bitmap(batPosX, 280 BAT_Y_POS, BAT_SHAPE); 281 TV.select_font(font4x6); 282 TV.draw_line(0,TXT_Y_POS-2,127,TXT_Y_POS-2,WHITE); 283 284 TV.print(122,TXT_Y_POS,lives); 285 TV.print( 0,TXT_Y_POS,Score); 286 287 delay(1000); 288 289 balPosX = batPosX + BAT_SIZE/2 ; 290 //ball X position 291 balPosY = BAT_Y_POS-1; //ball Y position 292 balDirX 293 = 1; //ball X direction (1 ; -1) 294 balDirY = -1; //ball Y direction (1 295 ; -1) 296 balsped = BAL_SPEED ; //ball initial speed 297 mill = 298 millis() ; 299 300 //-----------------------------------------------------------------------------------------------------Main 301 Cycle-begin 302 303 while (gamSt == 1 && bricksleft >0) { 304 305 306 307 //-------------------------------------------------------------Bat-begin- 308 309 310 batMove = analogRead(WHEEL_MOVE); //bat move 311 312 313 batPosX = batMove / RATIO_WHEEL ; 314 315 if 316 (batPosX -1 == batOldX || batPosX + 1 == batOldX) batPosX = batOldX; //Avoiding 317 flickering 318 319 if (batOldX != batPosX) { 320 TV.bitmap(batOldX, 321 BAT_Y_POS, BNN_SHAPE); 322 TV.bitmap(batPosX, BAT_Y_POS, BAT_SHAPE); 323 324 batOldX = batPosX; 325 } 326 327 328 //-------------------------------------------------------------Bat-end--- 329 330 331 332 //-------------------------------------------------------------Ball-move- 333 334 335 if ( mill + balsped < millis() ) { 336 337 338 TV.select_font(font4x6); 339 TV.draw_line(0,TXT_Y_POS-2,127,TXT_Y_POS-2,WHITE); 340 341 TV.print(122,TXT_Y_POS,lives); 342 TV.print( 343 0,TXT_Y_POS,Score); 344 345 TV.set_pixel(balPosX,balPosY,BLACK); 346 //before to redraw the bricks 347 348 if ( TV.get_pixel( 349 balPosX+balDirX , balPosY+balDirY ) == WHITE ) { 350 351 352 if (balPosY < 36+BRK_Y_POS){ //hit a brick 353 354 int 355 brickX = (int)( (balPosX+balDirX-BRK_X_POS ) / 9 ); 356 int 357 brickY = (int)( (balPosY+balDirY-BRK_Y_POS ) / 9 ); 358 359 360 bMatrix[brickY][brickX] -= 1; 361 if 362 (bMatrix[brickY][brickX] > 0) TV.tone(2000,50); else TV.tone(3000,50); 363 364 365 bricksleft = draw_bricks(); 366 367 //like 368 in the original game, after 4 bricks broken the ball goes faster 369 if 370 (bricksleft +3 < 14*4 && balsped == BAL_SPEED) balsped -= 10; //14*4 = total 371 bricks 372 373 Score++; 374 375 376 TV.print( 0,TXT_Y_POS,Score); 377 378 379 //if the balPosX starting from 1 380 -instead of 0- can be divided by 9, means the ball is in the empty column between 381 two bricks. 382 //so it will change the X direction instead 383 of Y 384 if ( (balPosX-BRK_X_POS+1) % 9 == 0) { 385 balDirX 386 *= -1; 387 } 388 else { 389 balDirY 390 *= -1; 391 } 392 393 394 } 395 else if (balPosY < BAL_Y_MAX) { 396 //the ball hit the bat 397 398 //if 399 the bat hit the ball with the lateral side, the ball get a bigger angle and come 400 back from the incoming direction 401 if 402 (balPosX+balDirX == batPosX) balDirX =-2; 403 else if (balPosX+balDirX 404 == batPosX + BAT_SIZE -1) balDirX = 2; 405 else 406 if (balDirX ==2 || balDirX == -2) balDirX = balDirX /2; 407 408 409 410 balDirY =-1; 411 412 413 TV.tone(1000,50); 414 } 415 416 417 } 418 else { //the ball hit nothing 419 420 if (balPosX + balDirX > BAL_X_MAX || balPosX + balDirX < BAL_X_MIN) 421 {balDirX *= -1;} 422 if (balPosY + balDirY < BAL_Y_MIN) {balDirY 423 *= -1;} 424 425 if (balPosY >= BAL_Y_MAX) { //missed ball 426 427 428 TV.set_pixel(balPosX,balPosY,BLACK); //remove 429 this line if you don't like to see the black dot on the white line where the ball 430 gone out. 431 432 #ifdef DEBUG_ON 433 balDirY 434 = -1; 435 #else 436 lives--; 437 438 439 TV.tone(200,500); 440 delay(2000); 441 442 443 TV.print(122,TXT_Y_POS,lives); 444 445 balPosX 446 = batPosX + BAT_SIZE/2 ; //ball X position 447 balPosY = BAT_Y_POS-1; 448 //ball Y position 449 balDirX = 1; //ball X direction (1 ; -1) 450 451 balDirY = -1; //ball Y direction (1 ; -1) 452 #endif 453 454 455 if (lives == 0) { 456 gamSt 457 = 2; 458 TV.tone(500,50); delay(60); 459 TV.tone(400,50); 460 delay(60); 461 TV.tone(300,50); delay(60); 462 TV.tone(200,50); 463 delay(60); 464 TV.tone(100,50); delay(60); 465 } 466 467 468 } 469 470 } 471 472 473 if (balPosY == 45+BRK_Y_POS) draw_bricks(); //needed 474 to refresh the bricks from garbage that sometimes appears 475 476 //TV.set_pixel(balPosX,balPosY,BLACK); 477 //must to be done before to redraw the bricks to avoid the garbage 478 balPosX 479 += balDirX; 480 balPosY += balDirY; 481 TV.set_pixel(balPosX,balPosY,WHITE); 482 483 484 mill = millis() ; 485 } 486 487 488 489 //-----------------------------------------------------------------------------------------------------Main 490 Cycle-end--- / 491 492 } //while gamest == 1 and bricksleft >0 493 494 495 } //while (gamSt == 1) 496 497 //-----------------------------------------------------------------------------------------------------GAME 498 OVER 499 if (gamSt == 2){ //GAME OVER 500 gamSt = 0; 501 TV.clear_screen(); 502 503 TV.bitmap(0, 0, logo); 504 TV.bitmap(0, 32, over); 505 506 TV.select_font(font6x8); 507 TV.print(40,TXT_Y_POS,"SCORE:"); 508 509 TV.print(76,TXT_Y_POS,Score); 510 511 delay(1000); 512 513 514 butStart = 1; 515 while ( butStart == 1){ 516 517 butStart = digitalRead(BUTTON_START); //cannon shot 518 } 519 520 } //if (gamSt == 2) 521 } //loop 522
Bitmaps
arduino
1/** 2 * BreakOut 3 * 4 */ 5 6 7PROGMEM const unsigned char bk0[] = { 8 8, 8, //pictureresolution 9 0x00, 10 0x00, 11 0x00, 12 0x00, 13 0x00, 14 0x00, 15 0x00, 16 0x00 17}; 18 19PROGMEM const unsigned char bk1[] = { 20 8, 8, //pictureresolution 21 22 0xFF, 23 0x81, 24 0x81, 25 0xFF, 26 0x00, 27 0x00, 28 0x00, 29 0x00 30}; 31 32 33 34PROGMEM const unsigned char bk2[] = { 35 8, 8, //pictureresolution 36 37 0xFF, 38 0xFF, 39 0xFF, 40 0xFF, 41 0x00, 42 0x00, 43 0x00, 44 0x00 45}; 46 47 48 49 50PROGMEM const unsigned char bk3[] = { 51 8, 8, //pictureresolution 52 53 0xFF, 54 0xFF, 55 0xFF, 56 0xFF, 57 0x81, 58 0x81, 59 0x81, 60 0xFF 61}; 62 63 64 65PROGMEM const unsigned char bk4[] = { 66 8, 8, //pictureresolution 67 68 0xFF, 69 0xFF, 70 0xFF, 71 0xFF, 72 0xFF, 73 0xFF, 74 0xFF, 75 0xFF 76}; 77 78PROGMEM const unsigned char bat8[] = { 79 8, 8, //pictureresolution 80 0x00, 81 0x00, 82 0x00, 83 0x00, 84 0x00, 85 0xFF, 86 0xFF, 87 0xFF 88}; 89 90PROGMEM const unsigned char bnn8[] = { 91 8, 8, //pictureresolution 92 0x00, 93 0x00, 94 0x00, 95 0x00, 96 0x00, 97 0x00, 98 0x00, 99 0x00 100}; 101 102PROGMEM const unsigned char bat16[] = { 103 16, 8, //pictureresolution 104 0x00,0x00, 105 0x00,0x00, 106 0x00,0x00, 107 0x00,0x00, 108 0x00,0x00, 109 0xFF,0xFF, 110 0xFF,0xFF, 111 0xFF,0xFF 112}; 113 114PROGMEM const unsigned char bnn16[] = { 115 16, 8, //pictureresolution 116 0x00,0x00, 117 0x00,0x00, 118 0x00,0x00, 119 0x00,0x00, 120 0x00,0x00, 121 0x00,0x00, 122 0x00,0x00, 123 0x00,0x00 124}; 125 126 127//start 128PROGMEM const unsigned char start[] = { 129 128, 64, //pictureresolution 130 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 131 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 132 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 133 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 134 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 135 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 136 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 137 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 138 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 139 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 140 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 141 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 142 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 143 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 144 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 145 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 146 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 147 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 148 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 149 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 150 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 151 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 152 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 153 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 154 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 155 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 156 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 157 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 158 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 159 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 160 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 161 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 162 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 163 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 164 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 165 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 166 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 167 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 168 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 169 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 170 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 171 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 172 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 173 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 174 0x00,0x00,0x00,0x00,0xF3,0xCF,0x9C,0x70,0x07,0x3E,0x73,0xCF,0x80,0x00,0x00,0x00, 175 0x00,0x00,0x00,0x00,0x8A,0x28,0x22,0x88,0x08,0x88,0x8A,0x22,0x00,0x00,0x00,0x00, 176 0x00,0x00,0x00,0x00,0x8A,0x28,0x20,0x80,0x08,0x08,0x8A,0x22,0x00,0x00,0x00,0x00, 177 0x00,0x00,0x00,0x00,0xF3,0xCF,0x1C,0x70,0x07,0x08,0x8B,0xC2,0x00,0x00,0x00,0x00, 178 0x00,0x00,0x00,0x00,0x82,0x48,0x02,0x08,0x00,0x88,0xFA,0x42,0x00,0x00,0x00,0x00, 179 0x00,0x00,0x00,0x00,0x82,0x28,0x22,0x88,0x08,0x88,0x8A,0x22,0x00,0x00,0x00,0x00, 180 0x00,0x00,0x00,0x00,0x82,0x2F,0x9C,0x70,0x07,0x08,0x8A,0x22,0x00,0x00,0x00,0x00, 181 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 182 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 183 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 184 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 185 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 186 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 187 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 188 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 189 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 190 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 191 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 192 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 193 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 194}; 195 196//game over 197PROGMEM const unsigned char over[] = { 198 128, 64, //pictureresolution 199 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 200 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 201 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 202 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 203 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 204 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 205 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 206 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 207 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 208 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 209 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 210 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 211 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 212 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 213 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 214 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 215 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 216 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 217 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 218 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 219 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 220 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 221 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 222 0x3F,0xFF,0xF9,0xFF,0xFF,0xCF,0xFF,0xFE,0x7F,0xFF,0xF3,0xFF,0xFF,0x9F,0xFF,0xFC, 223 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 224 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 225 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 226 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 227 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 228 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 229 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 230 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 231 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 232 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 233 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 234 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 235 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 236 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 237 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 238 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 239 0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x00,0x00,0x00, 240 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 241 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 242 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 243 0x00,0x00,0x00,0x00,0x03,0x8E,0x45,0xF0,0x0E,0x45,0xF7,0x80,0x00,0x00,0x00,0x00, 244 0x00,0x00,0x00,0x00,0x04,0x51,0x6D,0x00,0x11,0x45,0x04,0x40,0x00,0x00,0x00,0x00, 245 0x00,0x00,0x00,0x00,0x04,0x11,0x55,0x00,0x11,0x45,0x04,0x40,0x00,0x00,0x00,0x00, 246 0x00,0x00,0x00,0x00,0x05,0xD1,0x45,0xE0,0x11,0x45,0xE7,0x80,0x00,0x00,0x00,0x00, 247 0x00,0x00,0x00,0x00,0x04,0x5F,0x45,0x00,0x11,0x45,0x04,0x80,0x00,0x00,0x00,0x00, 248 0x00,0x00,0x00,0x00,0x04,0x51,0x45,0x00,0x11,0x29,0x04,0x40,0x00,0x00,0x00,0x00, 249 0x00,0x00,0x00,0x00,0x03,0xD1,0x45,0xF0,0x0E,0x11,0xF4,0x40,0x00,0x00,0x00,0x00, 250 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 251 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 252 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 253 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 254 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 255 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 256 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 257 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 258 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 259 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 260 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 261 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 262 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 263}; 264 265//logo 266PROGMEM const unsigned char logo[] = { 267 128, 32, //pictureresolution 268 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 269 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 270 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 271 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 272 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 273 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 274 0x07,0xE0,0x1F,0xC0,0x0F,0xE0,0xFE,0x0F,0x87,0xC0,0x3F,0xC0,0x3E,0x1F,0x3F,0xFC, 275 0x1F,0xF0,0x7F,0xE0,0x1F,0xE1,0xFF,0x0F,0x87,0xC0,0xFF,0xF0,0x3E,0x1F,0x3F,0xFC, 276 0x3F,0xF8,0xFF,0xF0,0x3F,0xE3,0xFF,0x8F,0x87,0xC1,0xFF,0xF8,0x3E,0x1F,0x3F,0xFC, 277 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 278 0x3F,0xFC,0xFF,0xF8,0xFF,0xE7,0xFF,0xCF,0x8F,0x87,0xFF,0xFE,0x3E,0x1F,0x3F,0xFC, 279 0x3C,0x7C,0xF8,0xF9,0xFC,0x07,0xC7,0xCF,0x9F,0x07,0xE0,0x7E,0x3E,0x1F,0x03,0xC0, 280 0x3C,0x7C,0xF8,0xF9,0xF8,0x07,0xC7,0xCF,0xBF,0x0F,0xC0,0x3F,0x3E,0x1F,0x03,0xC0, 281 0x3C,0xF8,0xF9,0xF1,0xF0,0x07,0x83,0xCF,0xFE,0x0F,0x80,0x1F,0x3E,0x1F,0x03,0xC0, 282 0x3F,0xF8,0xFF,0xF3,0xFF,0xE7,0x83,0xCF,0xFE,0x0F,0x80,0x1F,0x3E,0x1F,0x03,0xC0, 283 0x3F,0xF0,0xFF,0xE3,0xFF,0xE7,0xFF,0xCF,0xFF,0x0F,0x80,0x1F,0x3E,0x1F,0x03,0xC0, 284 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 285 0x3F,0xF8,0xFF,0xF3,0xFF,0xE7,0xFF,0xCF,0xFF,0x8F,0x80,0x1F,0x3E,0x1F,0x03,0xC0, 286 0x3F,0xFC,0xF9,0xF3,0xFF,0xE7,0xFF,0xCF,0x8F,0xCF,0x80,0x1F,0x3E,0x1F,0x03,0xC0, 287 0x3C,0x7C,0xF8,0xF9,0xF0,0x07,0xC7,0xCF,0x87,0xC7,0xC0,0x3E,0x3E,0x1F,0x03,0xC0, 288 0x3C,0x7C,0xF8,0xF9,0xF8,0x07,0xC7,0xCF,0x87,0xC7,0xE0,0x7E,0x3E,0x1F,0x03,0xC0, 289 0x3C,0xFC,0xF8,0xF8,0xFC,0x07,0xC7,0xCF,0x87,0xC3,0xF0,0xFC,0x3F,0x3F,0x03,0xC0, 290 0x3F,0xFC,0xF8,0xF8,0xFF,0xE7,0xC7,0xCF,0x87,0xC3,0xFF,0xFC,0x1F,0xFE,0x03,0xC0, 291 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 292 0x3F,0xF8,0xF8,0xF8,0x3F,0xE7,0xC7,0xCF,0x87,0xC1,0xFF,0xF0,0x0F,0xFC,0x03,0xC0, 293 0x3F,0xF0,0xF8,0xF8,0x1F,0xE7,0xC7,0xCF,0x87,0xC0,0x7F,0xC0,0x07,0xF8,0x03,0xC0, 294 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 295 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 296 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 297 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 298 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 299 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 300}; 301
Downloadable files
Schematics
Schematics
Schematics
Schematics
Schematics
Schematics
Schematics
Schematics

Comments
Only logged in users can leave comments