├── ArduinoBT.ino ├── MatrixBT.ino ├── README.md ├── lib ├── buzzer_page.dart ├── connection.dart ├── device.dart ├── led_page.dart ├── led_page2.dart ├── main.dart └── send_message.dart └── pubspec.yaml /ArduinoBT.ino: -------------------------------------------------------------------------------- 1 | #include 2 | int buzzerPin = 12; 3 | int notaSayisi = 8; 4 | int kdo = 262; 5 | int re = 294; 6 | int mi = 330; 7 | int fa = 349; 8 | int sol = 392; 9 | int la = 440; 10 | int si = 494; 11 | int ido = 523; 12 | int cmd = -1; 13 | int flag = 0; 14 | int ledPin = 13; 15 | 16 | 17 | LiquidCrystal lcd(8, 7, 6, 5, 4, 3); 18 | void setup() { 19 | Serial.begin(9600); 20 | lcd.begin(16,2); 21 | 22 | Serial1.begin(9600); 23 | pinMode(13,OUTPUT); 24 | 25 | } 26 | 27 | void loop() { 28 | String outMsg; 29 | int incomingByte; 30 | byte byteCounter = 0; 31 | byte words[64]; 32 | if(Serial1.available()>0){ 33 | 34 | 35 | 36 | flag = 1; 37 | 38 | } 39 | cmd = Serial1.read(); 40 | if(flag == 1){ 41 | 42 | 43 | if(cmd == '2'){ 44 | tone(buzzerPin,kdo); 45 | 46 | } 47 | else if(cmd == '3'){ 48 | tone(buzzerPin,re); 49 | 50 | } 51 | else if(cmd == '4'){ 52 | tone(buzzerPin,mi); 53 | 54 | } 55 | else if(cmd == '5'){ 56 | tone(buzzerPin,fa); 57 | } 58 | else if(cmd == '6'){ 59 | tone(buzzerPin,sol); 60 | } 61 | else if(cmd == '7'){ 62 | tone(buzzerPin,la); 63 | } 64 | else if(cmd == '8'){ 65 | tone(buzzerPin,si); 66 | } else if(cmd == '9'){ 67 | tone(buzzerPin,ido); 68 | }else if(cmd == '1'){ 69 | noTone(buzzerPin); 70 | }else if(cmd == 'a'){ 71 | digitalWrite(ledPin,HIGH); 72 | }else if(cmd == 'k'){ 73 | digitalWrite(ledPin,LOW); 74 | 75 | }else if(cmd == 't'){ 76 | lcd.clear(); 77 | } 78 | 79 | 80 | Serial1.println("got data"); 81 | incomingByte = Serial1.read(); 82 | while (incomingByte > 0){ 83 | words[byteCounter++] = incomingByte; 84 | Serial1.print(incomingByte,DEC); 85 | incomingByte = Serial1.read(); 86 | Serial1.print(" "); 87 | } // while 88 | Serial1.println(""); 89 | for (int x = 0; x < byteCounter; x++){ 90 | 91 | outMsg += char(words[x]); 92 | 93 | } // for 94 | 95 | lcd.print(outMsg); 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | } else{ 115 | Serial1.print("unknown command: "); 116 | Serial1.write(cmd); 117 | Serial1.print(" ("); 118 | Serial1.print(cmd, DEC); 119 | Serial1.print(")"); 120 | 121 | Serial1.println(); 122 | } 123 | flag = 0; 124 | cmd = 65; 125 | } 126 | -------------------------------------------------------------------------------- /MatrixBT.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | int DIN = 10; 5 | int CS = 9; 6 | int CLK = 8; 7 | long int cmd = -1; 8 | int flag = 0; 9 | int maxInUse = 1; 10 | int i; 11 | int z; 12 | 13 | String deneme[64] = {}; 14 | 15 | MaxMatrix m(DIN, CS, CLK, maxInUse); 16 | 17 | const unsigned char A[] = {8, 8, 18 | B00110000, 19 | B01100110, 20 | B11000110, 21 | B11000000, 22 | B11000000, 23 | B11000110, 24 | B01100110, 25 | B00110000, 26 | 27 | }; 28 | 29 | const unsigned char B[] = {8, 8, 30 | B00111000, 31 | B00101000, 32 | B01101110, 33 | B01100010, 34 | B00100010, 35 | B01101110, 36 | B01101000, 37 | B00111000, 38 | 39 | 40 | }; 41 | const unsigned char C[] = {8, 8, 42 | B00001000, 43 | B00001100, 44 | B00001110, 45 | B11111111, 46 | B11111111, 47 | B00001110, 48 | B00001100, 49 | B00001000, 50 | 51 | }; 52 | const unsigned char D[] = {8, 8, 53 | B00010000, 54 | B00110000, 55 | B01110000, 56 | B11111111, 57 | B11111111, 58 | B01110000, 59 | B00110000, 60 | B00010000, 61 | 62 | 63 | }; 64 | const unsigned char F[] = {8, 8, 65 | B00011000, 66 | B00111100, 67 | B01111110, 68 | B11111111, 69 | B00011000, 70 | B00011000, 71 | B00011000, 72 | B00011000, 73 | 74 | 75 | }; 76 | const unsigned char G[] = {8, 8, 77 | B00011000, 78 | B00011000, 79 | B00011000, 80 | B00011000, 81 | B11111111, 82 | B01111110, 83 | B00111100, 84 | B00011000, 85 | 86 | 87 | }; 88 | 89 | void setup() { 90 | 91 | m.init(); 92 | m.setIntensity(7); 93 | Serial1.begin(9600); 94 | for(i=0;i<65;i++){ 95 | deneme[i] = i; 96 | } 97 | } 98 | 99 | void loop() { 100 | String outMsg; 101 | int incomingByte; 102 | byte byteCounter = 0; 103 | byte words[64]; 104 | if(Serial1.available()>0){ 105 | 106 | flag = 1; 107 | } 108 | 109 | cmd = Serial1.read(); 110 | if(flag == 1){ 111 | 112 | 113 | 114 | delay(500); 115 | Serial1.write(" Veri Var"); 116 | 117 | incomingByte = Serial1.read(); 118 | while (incomingByte > 0){ 119 | words[byteCounter++] = incomingByte; 120 | Serial1.print(incomingByte,DEC); 121 | incomingByte = Serial1.read(); 122 | Serial1.print(" "); 123 | } // while 124 | Serial1.println(""); 125 | for (int x = 0; x < byteCounter; x++){ 126 | 127 | outMsg += char(words[x]); 128 | 129 | } // for 130 | 131 | 132 | 133 | 134 | 135 | if(outMsg == deneme[0]+"+1"){ 136 | m.setDot(0,0,true); 137 | }else if(outMsg == deneme[0]+"+0"){ 138 | m.setDot(0,0,false); 139 | } 140 | if(outMsg == deneme[1]+"+1"){ 141 | m.setDot(1,0,true); 142 | }else if(outMsg == deneme[1]+"+0"){ 143 | m.setDot(1,0,false); 144 | } 145 | if(outMsg == deneme[2]+"+1"){ 146 | m.setDot(2,0,true); 147 | }else if(outMsg == deneme[2]+"+0"){ 148 | m.setDot(2,0,false); 149 | } 150 | if(outMsg == deneme[3]+"+1"){ 151 | m.setDot(3,0,true); 152 | }else if(outMsg == deneme[3]+"+0"){ 153 | m.setDot(3,0,false); 154 | } 155 | if(outMsg == deneme[4]+"+1"){ 156 | m.setDot(4,0,true); 157 | }else if(outMsg == deneme[4]+"+0"){ 158 | m.setDot(4,0,false); 159 | } 160 | if(outMsg == deneme[5]+"+1"){ 161 | m.setDot(5,0,true); 162 | }else if(outMsg == deneme[5]+"+0"){ 163 | m.setDot(5,0,false); 164 | } 165 | if(outMsg == deneme[6]+"+1"){ 166 | m.setDot(6,0,true); 167 | }else if(outMsg == deneme[6]+"+0"){ 168 | m.setDot(6,0,false); 169 | } 170 | if(outMsg == deneme[7]+"+1"){ 171 | m.setDot(7,0,true); 172 | }else if(outMsg == deneme[7]+"+0"){ 173 | m.setDot(7,0,false); 174 | } 175 | 176 | 177 | 178 | if(outMsg == deneme[8]+"+1"){ 179 | m.setDot(0,1,true); 180 | }else if(outMsg == deneme[8]+"+0"){ 181 | m.setDot(0,1,false); 182 | } 183 | if(outMsg == deneme[9]+"+1"){ 184 | m.setDot(1,1,true); 185 | }else if(outMsg == deneme[9]+"+0"){ 186 | m.setDot(1,1,false); 187 | } 188 | if(outMsg == deneme[10]+"+1"){ 189 | m.setDot(2,1,true); 190 | }else if(outMsg == deneme[10]+"+0"){ 191 | m.setDot(2,1,false); 192 | } 193 | if(outMsg == deneme[11]+"+1"){ 194 | m.setDot(3,1,true); 195 | }else if(outMsg == deneme[11]+"+0"){ 196 | m.setDot(3,1,false); 197 | } 198 | if(outMsg == deneme[12]+"+1"){ 199 | m.setDot(4,1,true); 200 | }else if(outMsg == deneme[12]+"+0"){ 201 | m.setDot(4,1,false); 202 | } 203 | if(outMsg == deneme[13]+"+1"){ 204 | m.setDot(5,1,true); 205 | }else if(outMsg == deneme[13]+"+0"){ 206 | m.setDot(5,1,false); 207 | } 208 | if(outMsg == deneme[14]+"+1"){ 209 | m.setDot(6,1,true); 210 | }else if(outMsg == deneme[14]+"+0"){ 211 | m.setDot(6,1,false); 212 | } 213 | if(outMsg == deneme[15]+"+1"){ 214 | m.setDot(7,1,true); 215 | }else if(outMsg == deneme[15]+"+0"){ 216 | m.setDot(7,1,false); 217 | } 218 | 219 | 220 | 221 | 222 | 223 | 224 | if(outMsg == deneme[16]+"+1"){ 225 | m.setDot(0,2,true); 226 | }else if(outMsg == deneme[16]+"+0"){ 227 | m.setDot(0,2,false); 228 | } 229 | if(outMsg == deneme[17]+"+1"){ 230 | m.setDot(1,2,true); 231 | }else if(outMsg == deneme[17]+"+0"){ 232 | m.setDot(1,2,false); 233 | } 234 | if(outMsg == deneme[18]+"+1"){ 235 | m.setDot(2,2,true); 236 | }else if(outMsg == deneme[18]+"+0"){ 237 | m.setDot(2,2,false); 238 | } 239 | if(outMsg == deneme[19]+"+1"){ 240 | m.setDot(3,2,true); 241 | }else if(outMsg == deneme[19]+"+0"){ 242 | m.setDot(3,2,false); 243 | } 244 | if(outMsg == deneme[20]+"+1"){ 245 | m.setDot(4,2,true); 246 | }else if(outMsg == deneme[20]+"+0"){ 247 | m.setDot(4,2,false); 248 | } 249 | if(outMsg == deneme[21]+"+1"){ 250 | m.setDot(5,2,true); 251 | }else if(outMsg == deneme[21]+"+0"){ 252 | m.setDot(5,2,false); 253 | } 254 | if(outMsg == deneme[22]+"+1"){ 255 | m.setDot(6,2,true); 256 | }else if(outMsg == deneme[22]+"+0"){ 257 | m.setDot(6,2,false); 258 | } 259 | 260 | if(outMsg == deneme[23]+"+1"){ 261 | m.setDot(7,2,true); 262 | }else if(outMsg == deneme[23]+"+0"){ 263 | m.setDot(7,2,false); 264 | } 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | if(outMsg == deneme[24]+"+1"){ 276 | m.setDot(0,3,true); 277 | }else if(outMsg == deneme[24]+"+0"){ 278 | m.setDot(0,3,false); 279 | } 280 | if(outMsg == deneme[25]+"+1"){ 281 | m.setDot(1,3,true); 282 | }else if(outMsg == deneme[25]+"+0"){ 283 | m.setDot(1,3,false); 284 | } 285 | if(outMsg == deneme[26]+"+1"){ 286 | m.setDot(2,3,true); 287 | }else if(outMsg == deneme[26]+"+0"){ 288 | m.setDot(2,3,false); 289 | } 290 | if(outMsg == deneme[27]+"+1"){ 291 | m.setDot(3,3,true); 292 | }else if(outMsg == deneme[27]+"+0"){ 293 | m.setDot(3,3,false); 294 | } 295 | if(outMsg == deneme[28]+"+1"){ 296 | m.setDot(4,3,true); 297 | }else if(outMsg == deneme[28]+"+0"){ 298 | m.setDot(4,3,false); 299 | } 300 | if(outMsg == deneme[29]+"+1"){ 301 | m.setDot(5,3,true); 302 | }else if(outMsg == deneme[29]+"+0"){ 303 | m.setDot(5,3,false); 304 | } 305 | if(outMsg == deneme[30]+"+1"){ 306 | m.setDot(6,3,true); 307 | }else if(outMsg == deneme[30]+"+0"){ 308 | m.setDot(6,3,false); 309 | } 310 | 311 | if(outMsg == deneme[31]+"+1"){ 312 | m.setDot(7,3,true); 313 | }else if(outMsg == deneme[31]+"+0"){ 314 | m.setDot(7,3,false); 315 | } 316 | 317 | 318 | 319 | if(outMsg == deneme[32]+"+1"){ 320 | m.setDot(0,4,true); 321 | }else if(outMsg == deneme[32]+"+0"){ 322 | m.setDot(0,4,false); 323 | } 324 | if(outMsg == deneme[33]+"+1"){ 325 | m.setDot(1,4,true); 326 | }else if(outMsg == deneme[33]+"+0"){ 327 | m.setDot(1,4,false); 328 | } 329 | if(outMsg == deneme[34]+"+1"){ 330 | m.setDot(2,4,true); 331 | }else if(outMsg == deneme[34]+"+0"){ 332 | m.setDot(2,4,false); 333 | } 334 | if(outMsg == deneme[35]+"+1"){ 335 | m.setDot(3,4,true); 336 | }else if(outMsg == deneme[35]+"+0"){ 337 | m.setDot(3,4,false); 338 | } 339 | if(outMsg == deneme[36]+"+1"){ 340 | m.setDot(4,4,true); 341 | }else if(outMsg == deneme[36]+"+0"){ 342 | m.setDot(4,4,false); 343 | } 344 | if(outMsg == deneme[37]+"+1"){ 345 | m.setDot(5,4,true); 346 | }else if(outMsg == deneme[37]+"+0"){ 347 | m.setDot(5,4,false); 348 | } 349 | if(outMsg == deneme[38]+"+1"){ 350 | m.setDot(6,4,true); 351 | }else if(outMsg == deneme[38]+"+0"){ 352 | m.setDot(6,4,false); 353 | } 354 | if(outMsg == deneme[39]+"+1"){ 355 | m.setDot(7,4,true); 356 | }else if(outMsg == deneme[39]+"+0"){ 357 | m.setDot(7,4,false); 358 | } 359 | 360 | 361 | 362 | 363 | if(outMsg == deneme[40]+"+1"){ 364 | m.setDot(0,5,true); 365 | }else if(outMsg == deneme[40]+"+0"){ 366 | m.setDot(0,5,false); 367 | } 368 | if(outMsg == deneme[41]+"+1"){ 369 | m.setDot(1,5,true); 370 | }else if(outMsg == deneme[41]+"+0"){ 371 | m.setDot(1,5,false); 372 | } 373 | if(outMsg == deneme[42]+"+1"){ 374 | m.setDot(2,5,true); 375 | }else if(outMsg == deneme[42]+"+0"){ 376 | m.setDot(2,5,false); 377 | } 378 | if(outMsg == deneme[43]+"+1"){ 379 | m.setDot(3,5,true); 380 | }else if(outMsg == deneme[43]+"+0"){ 381 | m.setDot(3,5,false); 382 | } 383 | if(outMsg == deneme[44]+"+1"){ 384 | m.setDot(4,5,true); 385 | }else if(outMsg == deneme[44]+"+0"){ 386 | m.setDot(4,5,false); 387 | } 388 | if(outMsg == deneme[45]+"+1"){ 389 | m.setDot(5,5,true); 390 | }else if(outMsg == deneme[45]+"+0"){ 391 | m.setDot(5,5,false); 392 | } 393 | if(outMsg == deneme[46]+"+1"){ 394 | m.setDot(6,5,true); 395 | }else if(outMsg == deneme[46]+"+0"){ 396 | m.setDot(6,5,false); 397 | } 398 | if(outMsg == deneme[47]+"+1"){ 399 | m.setDot(7,5,true); 400 | }else if(outMsg == deneme[47]+"+0"){ 401 | m.setDot(7,5,false); 402 | } 403 | 404 | 405 | 406 | 407 | 408 | if(outMsg == deneme[48]+"+1"){ 409 | m.setDot(0,6,true); 410 | }else if(outMsg == deneme[48]+"+0"){ 411 | m.setDot(0,6,false); 412 | } 413 | if(outMsg == deneme[49]+"+1"){ 414 | m.setDot(1,6,true); 415 | }else if(outMsg == deneme[49]+"+0"){ 416 | m.setDot(1,6,false); 417 | } 418 | if(outMsg == deneme[50]+"+1"){ 419 | m.setDot(2,6,true); 420 | }else if(outMsg == deneme[50]+"+0"){ 421 | m.setDot(2,6,false); 422 | } 423 | if(outMsg == deneme[51]+"+1"){ 424 | m.setDot(3,6,true); 425 | }else if(outMsg == deneme[51]+"+0"){ 426 | m.setDot(3,6,false); 427 | } 428 | if(outMsg == deneme[52]+"+1"){ 429 | m.setDot(4,6,true); 430 | }else if(outMsg == deneme[52]+"+0"){ 431 | m.setDot(4,6,false); 432 | } 433 | if(outMsg == deneme[53]+"+1"){ 434 | m.setDot(5,6,true); 435 | }else if(outMsg == deneme[53]+"+0"){ 436 | m.setDot(5,6,false); 437 | } 438 | if(outMsg == deneme[54]+"+1"){ 439 | m.setDot(6,6,true); 440 | }else if(outMsg == deneme[54]+"+0"){ 441 | m.setDot(6,6,false); 442 | } 443 | if(outMsg == deneme[55]+"+1"){ 444 | m.setDot(7,6,true); 445 | }else if(outMsg == deneme[55]+"+0"){ 446 | m.setDot(7,6,false); 447 | } 448 | 449 | 450 | if(outMsg == deneme[56]+"+1"){ 451 | m.setDot(0,7,true); 452 | }else if(outMsg == deneme[56]+"+0"){ 453 | m.setDot(0,7,false); 454 | } 455 | if(outMsg == deneme[57]+"+1"){ 456 | m.setDot(1,7,true); 457 | }else if(outMsg == deneme[57]+"+0"){ 458 | m.setDot(1,7,false); 459 | } 460 | if(outMsg == deneme[58]+"+1"){ 461 | m.setDot(2,7,true); 462 | }else if(outMsg == deneme[58]+"+0"){ 463 | m.setDot(2,7,false); 464 | } 465 | if(outMsg == deneme[59]+"+1"){ 466 | m.setDot(3,7,true); 467 | }else if(outMsg == deneme[59]+"+0"){ 468 | m.setDot(3,7,false); 469 | } 470 | if(outMsg == deneme[60]+"+1"){ 471 | m.setDot(4,7,true); 472 | }else if(outMsg == deneme[60]+"+0"){ 473 | m.setDot(4,7,false); 474 | } 475 | if(outMsg == deneme[61]+"+1"){ 476 | m.setDot(5,7,true); 477 | }else if(outMsg == deneme[61]+"+0"){ 478 | m.setDot(5,7,false); 479 | } 480 | if(outMsg == deneme[62]+"+1"){ 481 | m.setDot(6,7,true); 482 | }else if(outMsg == deneme[62]+"+0"){ 483 | m.setDot(6,7,false); 484 | } 485 | if(outMsg == deneme[63]+"+1"){ 486 | m.setDot(7,7,true); 487 | }else if(outMsg == deneme[63]+"+0"){ 488 | m.setDot(7,7,false); 489 | } 490 | 491 | 492 | 493 | if(outMsg == "c"){ 494 | m.writeSprite(0,0,A); 495 | } 496 | 497 | if(outMsg == "d"){ 498 | m.writeSprite(0,0,B); 499 | } 500 | if(outMsg == "e"){ 501 | m.writeSprite(0,0,C); 502 | } 503 | if(outMsg == "f"){ 504 | m.writeSprite(0,0,D); 505 | } 506 | if(outMsg == "g"){ 507 | m.writeSprite(0,0,F); 508 | } 509 | if(outMsg == "h"){ 510 | m.writeSprite(0,0,G); 511 | 512 | } 513 | if(outMsg == "j"){ 514 | m.clear(); 515 | Serial1.write("DENEMEEEEEEEEEEEEEEEEEE"); 516 | } 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | }} 527 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Arduino-BluetoothApp-Flutter 3 | [EN] Communicating arduino and android device with flutter app. 4 | App includes buzzer control, led control, 8x8 Matrix control and LCD control. Before use the app please check your minSdk it should be 19. 5 | 6 | [TR] Arduino ve android cihaz arasında iletişim kurmak için kullanılabilecek flutter app. 7 | Buzzer, led, 8x8 Matrix ve LCD kontrolü yapılabilmekte. App'in çalışması için minSdk'nın 19 olması gerekiyor. 8 | 9 | [EN] Images from app. 10 | [TR] Uygulama içi görseller. 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /lib/buzzer_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | class buzzerPage extends StatefulWidget { 5 | const buzzerPage({Key? key , required this.sendMessage1 , required this.sendMessage2 , required this.sendMessage3 , required this.sendMessage4 6 | , required this.sendMessage5 , required this.sendMessage6, 7 | required this.sendMessage7 , required this.sendMessage8 , required this.sendMessage9 }) : super(key: key); 8 | final Function sendMessage1; 9 | final Function sendMessage2; 10 | final Function sendMessage3; 11 | final Function sendMessage4; 12 | final Function sendMessage5; 13 | final Function sendMessage6; 14 | final Function sendMessage7; 15 | final Function sendMessage8; 16 | final Function sendMessage9; 17 | 18 | 19 | @override 20 | _buzzerPageState createState() => _buzzerPageState(); 21 | } 22 | 23 | class _buzzerPageState extends State { 24 | @override 25 | Widget build(BuildContext context) { 26 | return Column( 27 | children: [ 28 | SizedBox( 29 | height: MediaQuery.of(context).size.height / 10, 30 | ), 31 | Row( 32 | children: [ 33 | GestureDetector( 34 | onTapUp: (_) => widget.sendMessage1(), 35 | onTapDown: (_) => widget.sendMessage2(), 36 | child: CircleAvatar( 37 | radius: 35, 38 | backgroundColor: Colors.black, 39 | child: Text( 40 | "Do", 41 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 42 | )), 43 | ), 44 | SizedBox( 45 | width: 15, 46 | ), 47 | GestureDetector( 48 | onTapUp: (_) => widget.sendMessage1(), 49 | onTapDown: (_) => widget.sendMessage3(), 50 | child: CircleAvatar( 51 | radius: 35, 52 | backgroundColor: Colors.black, 53 | child: Text( 54 | "Re", 55 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 56 | ))), 57 | ], 58 | ), 59 | SizedBox( 60 | height: 15, 61 | ), 62 | Row( 63 | children: [ 64 | GestureDetector( 65 | onTapUp: (_) =>widget.sendMessage1(), 66 | onTapDown: (_) => widget.sendMessage4(), 67 | child: CircleAvatar( 68 | radius: 35, 69 | backgroundColor: Colors.black, 70 | child: Text( 71 | "Mi", 72 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 73 | )), 74 | ), 75 | SizedBox( 76 | width: 15, 77 | ), 78 | GestureDetector( 79 | onTapUp: (_) =>widget.sendMessage1(), 80 | onTapDown: (_) => widget.sendMessage5(), 81 | child: CircleAvatar( 82 | radius: 35, 83 | backgroundColor: Colors.black, 84 | child: Text( 85 | "Fa", 86 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 87 | ))), 88 | ], 89 | ), 90 | SizedBox( 91 | height: 15, 92 | ), 93 | Row( 94 | children: [ 95 | GestureDetector( 96 | onTapUp: (_) =>widget.sendMessage1(), 97 | onTapDown: (_) => widget.sendMessage6(), 98 | child: CircleAvatar( 99 | radius: 35, 100 | backgroundColor: Colors.black, 101 | child: Text( 102 | "Sol", 103 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 104 | )), 105 | ), 106 | SizedBox( 107 | width: 15, 108 | ), 109 | GestureDetector( 110 | onTapUp: (_) =>widget.sendMessage1(), 111 | onTapDown: (_) => widget.sendMessage7(), 112 | child: CircleAvatar( 113 | radius: 35, 114 | backgroundColor: Colors.black, 115 | child: Text( 116 | "La", 117 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 118 | ))), 119 | ], 120 | ), 121 | SizedBox( 122 | height: 15, 123 | ), 124 | Row( 125 | children: [ 126 | GestureDetector( 127 | onTapUp: (_) =>widget.sendMessage1(), 128 | onTapDown: (_) => widget.sendMessage8(), 129 | child: CircleAvatar( 130 | radius: 35, 131 | backgroundColor: Colors.black, 132 | child: Text( 133 | "Si", 134 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 135 | )), 136 | ), 137 | SizedBox( 138 | width: 15, 139 | ), 140 | GestureDetector( 141 | onTapUp: (_) =>widget.sendMessage1(), 142 | onTapDown: (_) => widget.sendMessage9(), 143 | child: CircleAvatar( 144 | radius: 35, 145 | backgroundColor: Colors.black, 146 | child: Text( 147 | "iDo", 148 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 149 | ))), 150 | ], 151 | ), 152 | ], 153 | ); 154 | } 155 | } 156 | -------------------------------------------------------------------------------- /lib/connection.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'dart:async'; 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_bluetooth_serial/flutter_bluetooth_serial.dart'; 7 | 8 | import 'device.dart'; 9 | 10 | class SelectBondedDevicePage extends StatefulWidget { 11 | final bool? checkAvailability; 12 | final Function? onCahtPage; 13 | 14 | SelectBondedDevicePage( 15 | {this.checkAvailability = true, required this.onCahtPage}); 16 | 17 | @override 18 | _SelectBondedDevicePageState createState() => _SelectBondedDevicePageState(); 19 | } 20 | 21 | enum _DeviceAvailability { 22 | maybe, 23 | yes, 24 | } 25 | 26 | class _DeviceWithAvailability extends BluetoothDevice { 27 | final BluetoothDevice? device; 28 | final _DeviceAvailability? availability; 29 | final int? rssi; 30 | 31 | _DeviceWithAvailability(this.device, this.availability, [this.rssi]) 32 | : super(address: ""); 33 | } 34 | 35 | class _SelectBondedDevicePageState extends State { 36 | List<_DeviceWithAvailability> devices = <_DeviceWithAvailability>[]; 37 | 38 | StreamSubscription? _discoveryStreamSubscription; 39 | bool? _isDiscovering; 40 | 41 | @override 42 | void initState() { 43 | super.initState(); 44 | _isDiscovering = widget.checkAvailability!; 45 | if (_isDiscovering!) { 46 | _startDiscovery(); 47 | } 48 | FlutterBluetoothSerial.instance 49 | .getBondedDevices() 50 | .then((List bondedDevices) { 51 | setState(() { 52 | devices = bondedDevices 53 | .map( 54 | (device) => _DeviceWithAvailability( 55 | device, 56 | widget.checkAvailability! 57 | ? _DeviceAvailability.maybe 58 | : _DeviceAvailability.yes), 59 | ) 60 | .toList(); 61 | }); 62 | }); 63 | } 64 | 65 | void _restartDiscovery() { 66 | setState(() { 67 | _isDiscovering = true; 68 | }); 69 | } 70 | 71 | void _startDiscovery() { 72 | _discoveryStreamSubscription = 73 | FlutterBluetoothSerial.instance.startDiscovery().listen((r) { 74 | setState(() { 75 | Iterator i = devices.iterator; 76 | while (i.moveNext()) { 77 | var _device = i.current; 78 | if (_device.device == r.device) { 79 | _device.availability = _DeviceAvailability.yes; 80 | _device.rssi = r.rssi; 81 | } 82 | } 83 | }); 84 | }); 85 | 86 | _discoveryStreamSubscription!.onDone(() { 87 | setState(() { 88 | _isDiscovering = false; 89 | }); 90 | }); 91 | } 92 | 93 | void dispose() { 94 | _discoveryStreamSubscription?.cancel(); 95 | super.dispose(); 96 | } 97 | 98 | Widget build(BuildContext context) { 99 | List list = devices 100 | .map( 101 | (_device) => BluetoothDeviceListEntry( 102 | device: _device.device, 103 | // rssi: _device.rssi, 104 | // enabled: _device.availability == _DeviceAvailability.yes, 105 | onTap: () { 106 | widget.onCahtPage!(_device.device); 107 | }, 108 | ), 109 | ) 110 | .toList(); 111 | return ListView( 112 | children: list, 113 | ); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /lib/device.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bluetooth_serial/flutter_bluetooth_serial.dart'; 3 | 4 | class BluetoothDeviceListEntry extends StatelessWidget { 5 | const BluetoothDeviceListEntry({Key? key,required this.onTap,required this.device }) : super(key: key); 6 | final VoidCallback onTap; 7 | final BluetoothDevice? device; 8 | @override 9 | Widget build(BuildContext context) { 10 | return ListTile( 11 | onTap: onTap, 12 | leading: Icon(Icons.devices), 13 | title: Text(device!.name ?? "Bilinmeyen Cihaz"), 14 | subtitle: Text(device!.address.toString()), 15 | trailing: InkWell( 16 | onTap: onTap, 17 | child: Card( 18 | color: Colors.black, 19 | child: Container( 20 | height: MediaQuery.of(context).size.height/5, 21 | width: MediaQuery.of(context).size.width/5, 22 | child: Align( 23 | alignment: Alignment.center, 24 | child:Text('Bağlan',style: TextStyle(color: Colors.grey[400]),) 25 | ), 26 | ), 27 | ), 28 | ), 29 | 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/led_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | class ledPage extends StatefulWidget { 5 | const ledPage({Key? key, required this.sendMessageA , required this.sendMessageK}) : super(key: key); 6 | final Function sendMessageA; 7 | final Function sendMessageK; 8 | 9 | @override 10 | _ledPageState createState() => _ledPageState(); 11 | } 12 | 13 | class _ledPageState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | children: [ 18 | SizedBox( 19 | height: MediaQuery.of(context).size.height / 4, 20 | ), 21 | InkWell( 22 | onTap: () { 23 | widget.sendMessageA(); 24 | }, 25 | child: CircleAvatar( 26 | radius: 50, 27 | backgroundColor: Colors.black, 28 | child: Text( 29 | "AÇ", 30 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 31 | )), 32 | ), 33 | SizedBox( 34 | height: 50, 35 | ), 36 | InkWell( 37 | onTap: () { 38 | widget.sendMessageK(); 39 | }, 40 | child: CircleAvatar( 41 | radius: 50, 42 | backgroundColor: Colors.black, 43 | child: Text( 44 | "KAPAT", 45 | style: TextStyle(color: Colors.grey[400], fontSize: 20), 46 | ))), 47 | ], 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /lib/led_page2.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | class ledPage2 extends StatefulWidget { 5 | const ledPage2({Key? key, required this.sendMessageA , required this.sendMessageK}) : super(key: key); 6 | final Function sendMessageA; 7 | final Function sendMessageK; 8 | 9 | @override 10 | _ledPage2State createState() => _ledPage2State(); 11 | } 12 | 13 | class _ledPage2State extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | children: [ 18 | SizedBox( 19 | height: MediaQuery.of(context).size.height / 4, 20 | ), 21 | GestureDetector( 22 | onTapDown: (_) => widget.sendMessageA() 23 | , 24 | onTapUp: (_) => widget.sendMessageK(), 25 | child: CircleAvatar( 26 | radius: 50, 27 | backgroundColor: Colors.black, 28 | child: Icon(Icons.flash_on)), 29 | ), 30 | 31 | ], 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:buzzer_arduino/send_message.dart'; 2 | import 'package:buzzer_arduino/connection.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bluetooth_serial/flutter_bluetooth_serial.dart'; 5 | 6 | void main() => runApp(MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return MaterialApp( 12 | debugShowCheckedModeBanner: false, 13 | title: 'Bluetooth Buzzer', 14 | theme: ThemeData( 15 | colorScheme: ColorScheme.dark( 16 | secondary: Color(666666), primary: Color(0xFF075E54))), 17 | home: FutureBuilder( 18 | future: FlutterBluetoothSerial.instance.requestEnable(), 19 | builder: (BuildContext context, future) { 20 | if (future.connectionState == ConnectionState.waiting) { 21 | return Scaffold( 22 | body: Container( 23 | height: double.infinity, 24 | child: Center( 25 | child: Icon( 26 | Icons.bluetooth_disabled, 27 | size: 200, 28 | color: Colors.black, 29 | ), 30 | ), 31 | ), 32 | ); 33 | } else { 34 | return Home(); 35 | } 36 | }, 37 | ), 38 | ); 39 | } 40 | } 41 | 42 | ////////////////////////////////////////////////////////////////////////////////////////// 43 | 44 | class Home extends StatelessWidget { 45 | const Home({Key? key}) : super(key: key); 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return SafeArea( 50 | child: Scaffold( 51 | appBar: AppBar( 52 | title: Text("Bağlanılabilecek Cihazlar"), 53 | ), 54 | body: SelectBondedDevicePage( 55 | onCahtPage: (device1) { 56 | BluetoothDevice device = device1; 57 | Navigator.push(context, MaterialPageRoute(builder: (context) { 58 | return ChatPage( 59 | server: device, 60 | ); 61 | })); 62 | }, 63 | ), 64 | )); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/send_message.dart: -------------------------------------------------------------------------------- 1 | library send_messagee; 2 | 3 | import 'dart:async'; 4 | import 'dart:convert'; 5 | 6 | import 'dart:typed_data'; 7 | import 'package:animated_stack/animated_stack.dart'; 8 | import 'package:buzzer_arduino/buzzer_page.dart'; 9 | import 'package:buzzer_arduino/led_page.dart'; 10 | import 'package:buzzer_arduino/led_page2.dart'; 11 | 12 | import 'package:flutter/cupertino.dart'; 13 | import 'package:flutter/material.dart'; 14 | import 'package:flutter_bluetooth_serial/flutter_bluetooth_serial.dart'; 15 | 16 | class ChatPage extends StatefulWidget { 17 | final BluetoothDevice? server; 18 | const ChatPage({ 19 | Key? key, 20 | this.server, 21 | this.lcdMessage, 22 | }) : super(key: key); 23 | final String? lcdMessage; 24 | 25 | @override 26 | _ChatPageState createState() => _ChatPageState(); 27 | } 28 | 29 | var hadi; 30 | 31 | class _ChatPageState extends State 32 | with SingleTickerProviderStateMixin { 33 | TabController? _controller; 34 | 35 | BluetoothConnection? connection; 36 | 37 | final ScrollController listScrollController = ScrollController(); 38 | 39 | bool isConnecting = true; 40 | 41 | bool get isConnected => connection != null && connection!.isConnected; 42 | 43 | bool isDisconnecting = false; 44 | @override 45 | @override 46 | List _colorlist = []; 47 | List genrateColorslist() { 48 | List _colorslist = []; 49 | for (int i = 0; i < (8 * 8); i++) { 50 | _colorslist.add(Colors.black); 51 | } 52 | return _colorslist; 53 | } 54 | 55 | void initState() { 56 | super.initState(); 57 | 58 | _colorlist = genrateColorslist(); 59 | _controller = TabController(length: 6, vsync: this, initialIndex: 0); 60 | 61 | BluetoothConnection.toAddress(widget.server!.address).then((_connection) { 62 | print('Cihaza bağlanıldı'); 63 | connection = _connection; 64 | 65 | setState(() { 66 | isConnecting = false; 67 | isDisconnecting = false; 68 | }); 69 | }); 70 | } 71 | 72 | void dispose() { 73 | if (isConnected) { 74 | isDisconnecting = true; 75 | connection?.dispose(); 76 | connection = null; 77 | mineController.close(); 78 | } 79 | super.dispose(); 80 | } 81 | 82 | bool btnColor = false; 83 | 84 | StreamController mineController = 85 | StreamController.broadcast(); 86 | Stream myStream() async* { 87 | connection?.input?.listen((Uint8List data) { 88 | print(ascii.decode(data)); 89 | 90 | mineController.add(ascii.decode(data)); 91 | }); 92 | } 93 | 94 | Widget build(BuildContext context) { 95 | String denemee = "Veri Yok"; 96 | TextEditingController lcdController = TextEditingController(); 97 | mineController.addStream(myStream()); 98 | 99 | return Scaffold( 100 | appBar: AppBar( 101 | bottom: TabBar( 102 | isScrollable: true, 103 | indicatorColor: Colors.white, 104 | controller: _controller, 105 | tabs: [ 106 | Tab( 107 | text: "Buzzer", 108 | ), 109 | Tab( 110 | text: "Led", 111 | ), 112 | Tab( 113 | text: "Led 2", 114 | ), 115 | Tab( 116 | text: "LCD", 117 | ), 118 | Tab(text: "Matrix"), 119 | Tab(text: "Mesafe"), 120 | ], 121 | ), 122 | ), 123 | body: TabBarView( 124 | controller: _controller, 125 | children: [ 126 | Padding( 127 | padding: const EdgeInsets.symmetric(vertical: 50, horizontal: 95), 128 | child: buzzerPage( 129 | sendMessage1: () => _sendMessage('1'), 130 | sendMessage2: () => _sendMessage('2'), 131 | sendMessage3: () => _sendMessage('3'), 132 | sendMessage4: () => _sendMessage('4'), 133 | sendMessage5: () => _sendMessage('5'), 134 | sendMessage6: () => _sendMessage('6'), 135 | sendMessage7: () => _sendMessage('7'), 136 | sendMessage8: () => _sendMessage('8'), 137 | sendMessage9: () => _sendMessage('9'), 138 | )), 139 | Align( 140 | alignment: Alignment.center, 141 | child: ledPage( 142 | sendMessageA: () => _sendMessage('a'), 143 | sendMessageK: () => _sendMessage('k'), 144 | ), 145 | ), 146 | Align( 147 | alignment: Alignment.center, 148 | child: ledPage2( 149 | sendMessageA: () => _sendMessage('a'), 150 | sendMessageK: () => _sendMessage('k'), 151 | ), 152 | ), 153 | Align( 154 | alignment: Alignment.center, 155 | child: Padding( 156 | padding: EdgeInsets.symmetric( 157 | horizontal: MediaQuery.of(context).size.width / 10), 158 | child: SingleChildScrollView( 159 | physics: ClampingScrollPhysics(), 160 | child: Column( 161 | mainAxisAlignment: MainAxisAlignment.center, 162 | children: [ 163 | TextField( 164 | controller: lcdController, 165 | decoration: InputDecoration( 166 | hintText: "LCD ekranda gösterilecek yazıyı giriniz.", 167 | ), 168 | ), 169 | IconButton( 170 | onPressed: () { 171 | _sendMessage('x' + lcdController.text); 172 | }, 173 | icon: Icon(Icons.send)), 174 | IconButton( 175 | onPressed: () { 176 | _sendMessage('t'); 177 | }, 178 | icon: Icon(Icons.clear)) 179 | ]), 180 | ), 181 | ), 182 | ), 183 | AnimatedStack( 184 | backgroundColor: Colors.black, 185 | fabBackgroundColor: Colors.white, 186 | foregroundWidget: Container( 187 | decoration: BoxDecoration( 188 | color: Color(0xFF2d2d2d), 189 | ), 190 | child: Padding( 191 | padding: 192 | const EdgeInsets.symmetric(horizontal: 8.0, vertical: 55), 193 | child: GridView.builder( 194 | physics: NeverScrollableScrollPhysics(), 195 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 196 | crossAxisCount: 8, 197 | ), 198 | itemCount: 8 * 8, 199 | itemBuilder: (BuildContext context, int index) { 200 | return GestureDetector( 201 | onTap: () { 202 | btnColorChange(); 203 | if (_colorlist[index] == Colors.red) { 204 | setState(() { 205 | _colorlist[index] = Colors.black; 206 | }); 207 | _sendMessage(index.toString() + "+0"); 208 | } else { 209 | setState(() { 210 | _colorlist[index] = Colors.red; 211 | }); 212 | _sendMessage(index.toString() + "+1"); 213 | } 214 | 215 | print(index.toString()); 216 | print(index.toString()); 217 | }, 218 | child: Container( 219 | margin: EdgeInsets.all(1), 220 | decoration: BoxDecoration( 221 | color: _colorlist[index], 222 | shape: BoxShape.circle, 223 | ), 224 | ), 225 | ); 226 | }), 227 | ), 228 | ), 229 | columnWidget: Column( 230 | children: [ 231 | IconButton( 232 | onPressed: () { 233 | _sendMessage('c'); 234 | }, 235 | icon: Icon(Icons.face)), 236 | SizedBox( 237 | height: 15, 238 | ), 239 | IconButton( 240 | onPressed: () { 241 | _sendMessage('d'); 242 | }, 243 | icon: Icon(Icons.car_repair)), 244 | SizedBox( 245 | height: 15, 246 | ), 247 | IconButton( 248 | onPressed: () { 249 | _sendMessage('e'); 250 | }, 251 | icon: Icon(Icons.arrow_upward_outlined)), 252 | SizedBox( 253 | height: 15, 254 | ), 255 | IconButton( 256 | onPressed: () { 257 | _sendMessage('f'); 258 | }, 259 | icon: Icon(Icons.arrow_downward_outlined)), 260 | SizedBox( 261 | height: 15, 262 | ), 263 | IconButton( 264 | onPressed: () { 265 | _sendMessage('g'); 266 | }, 267 | icon: Icon(Icons.arrow_back_outlined)), 268 | SizedBox( 269 | height: 15, 270 | ), 271 | IconButton( 272 | onPressed: () { 273 | _sendMessage('h'); 274 | }, 275 | icon: Icon(Icons.arrow_forward_outlined)), 276 | ], 277 | ), 278 | bottomWidget: Align( 279 | child: Padding( 280 | padding: const EdgeInsets.symmetric(horizontal: 55), 281 | child: GestureDetector( 282 | onTap: () { 283 | int i; 284 | _sendMessage('j'); 285 | setState(() { 286 | for (i = 0; i < 64;i++){ 287 | _colorlist[i] = Colors.black; 288 | } 289 | }); 290 | }, 291 | child: Container( 292 | decoration: BoxDecoration( 293 | border: Border.all(color: Colors.white), 294 | borderRadius: BorderRadius.all(Radius.circular(15))), 295 | child: Padding( 296 | padding: const EdgeInsets.all(8.0), 297 | child: Row( 298 | children: [ 299 | Text("Matrix'i temizle", 300 | style: TextStyle( 301 | color: Colors.white, 302 | )), 303 | SizedBox( 304 | width: 15, 305 | ), 306 | Icon(Icons.clear) 307 | ], 308 | ), 309 | ), 310 | ), 311 | ), 312 | ), 313 | ), 314 | ), 315 | StreamBuilder( 316 | stream: mineController.stream.asBroadcastStream(), 317 | builder: (context, AsyncSnapshot snapshot) { 318 | if (snapshot.connectionState == ConnectionState.waiting) { 319 | return Padding( 320 | padding: const EdgeInsets.symmetric( 321 | horizontal: 100, vertical: 150), 322 | child: CircularProgressIndicator(), 323 | ); 324 | } 325 | return Center( 326 | child: Text( 327 | snapshot.data ?? denemee, 328 | style: TextStyle(fontSize: 50, color: Colors.black), 329 | ), 330 | ); 331 | }, 332 | ) 333 | ], 334 | ), 335 | ); 336 | } 337 | 338 | btnColorChange() { 339 | setState(() { 340 | btnColor = !btnColor; 341 | }); 342 | } 343 | 344 | _sendMessage(String text) async { 345 | text = text.trim(); 346 | 347 | if (text.length > 0) { 348 | try { 349 | connection!.output.add(Uint8List.fromList(utf8.encode(text))); 350 | await connection!.output.allSent; 351 | } catch (e) { 352 | // Ignore error, but notify state 353 | 354 | } 355 | } 356 | } 357 | 358 | _receiveMessage() { 359 | connection!.input!.listen((Uint8List data) { 360 | print('Data incoming: ${ascii.decode(data)}'); 361 | void deneme = ascii.decode(data); 362 | 363 | return deneme; 364 | }); 365 | } 366 | } 367 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: buzzer_arduino 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | flutter_bluetooth_serial: ^0.4.0 38 | syncfusion_flutter_sliders: ^19.3.45 39 | animated_stack: ^0.2.0 40 | flutter_launcher_icons: ^0.9.2 41 | 42 | dev_dependencies: 43 | flutter_test: 44 | sdk: flutter 45 | 46 | # The "flutter_lints" package below contains a set of recommended lints to 47 | # encourage good coding practices. The lint set provided by the package is 48 | # activated in the `analysis_options.yaml` file located at the root of your 49 | # package. See that file for information about deactivating specific lint 50 | # rules and activating additional ones. 51 | flutter_lints: ^1.0.0 52 | 53 | # For information on the generic Dart part of this file, see the 54 | # following page: https://dart.dev/tools/pub/pubspec 55 | 56 | # The following section is specific to Flutter. 57 | flutter: 58 | 59 | # The following line ensures that the Material Icons font is 60 | # included with your application, so that you can use the icons in 61 | # the material Icons class. 62 | uses-material-design: true 63 | 64 | # To add assets to your application, add an assets section, like this: 65 | # assets: 66 | # - images/a_dot_burr.jpeg 67 | # - images/a_dot_ham.jpeg 68 | 69 | # An image asset can refer to one or more resolution-specific "variants", see 70 | # https://flutter.dev/assets-and-images/#resolution-aware. 71 | 72 | # For details regarding adding assets from package dependencies, see 73 | # https://flutter.dev/assets-and-images/#from-packages 74 | 75 | # To add custom fonts to your application, add a fonts section here, 76 | # in this "flutter" section. Each entry in this list should have a 77 | # "family" key with the font family name, and a "fonts" key with a 78 | # list giving the asset and other descriptors for the font. For 79 | # example: 80 | # fonts: 81 | # - family: Schyler 82 | # fonts: 83 | # - asset: fonts/Schyler-Regular.ttf 84 | # - asset: fonts/Schyler-Italic.ttf 85 | # style: italic 86 | # - family: Trajan Pro 87 | # fonts: 88 | # - asset: fonts/TrajanPro.ttf 89 | # - asset: fonts/TrajanPro_Bold.ttf 90 | # weight: 700 91 | # 92 | # For details regarding fonts from package dependencies, 93 | # see https://flutter.dev/custom-fonts/#from-packages 94 | --------------------------------------------------------------------------------