├── README.md
├── flutterapp
├── .gitignore
├── .metadata
├── .vscode
│ └── launch.json
├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── gamepad
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ │ └── profile
│ │ │ └── AndroidManifest.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── assets
│ ├── bottom.svg
│ ├── left.svg
│ ├── right.svg
│ └── top.svg
├── h origin master
├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ │ └── WorkspaceSettings.xcsettings
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── Runner
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── Runner-Bridging-Header.h
├── lib
│ ├── homepage.dart
│ ├── main.dart
│ └── widigts
│ │ ├── fourbutton.dart
│ │ └── screen.dart
├── pubspec.lock
├── pubspec.yaml
└── test
│ └── widget_test.dart
├── screenshot
├── IMG20200724144254-removebg-preview.png
├── Screenshot_2020-07-24-14-51-21-96_8ebf8e7a4cd0bbdae5e9759fa195ed73.jpg
└── esp32car.png
└── videostreamesp32cam
├── esp32_l298n.cpp
├── esp32_l298n.h
└── videostream.ino
/README.md:
--------------------------------------------------------------------------------
1 | # esp32cam-car-with-flutter
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutterapp/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Symbolication related
37 | app.*.symbols
38 |
39 | # Obfuscation related
40 | app.*.map.json
41 |
42 | # Exceptions to above rules.
43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
44 |
--------------------------------------------------------------------------------
/flutterapp/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 1ad9baa8b99a2897c20f9e6e54d3b9b359ade314
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/flutterapp/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Flutter",
9 | "request": "launch",
10 | "type": "dart"
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/flutterapp/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/flutterapp/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.gamepad"
42 | minSdkVersion 24
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | }
47 |
48 | buildTypes {
49 | release {
50 | // TODO: Add your own signing config for the release build.
51 | // Signing with the debug keys for now, so `flutter run --release` works.
52 | signingConfig signingConfigs.debug
53 | }
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63 | }
64 |
--------------------------------------------------------------------------------
/flutterapp/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
11 |
12 |
13 |
18 |
25 |
29 |
33 |
38 |
42 |
43 |
44 |
45 |
46 |
47 |
49 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/kotlin/com/example/gamepad/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.gamepad
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutterapp/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/flutterapp/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutterapp/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.6.3'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/flutterapp/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/flutterapp/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Jun 27 23:04:51 IST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
7 |
--------------------------------------------------------------------------------
/flutterapp/android/settings.gradle:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Flutter Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style license that can be
3 | // found in the LICENSE file.
4 |
5 | include ':app'
6 |
7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
8 | def properties = new Properties()
9 |
10 | assert localPropertiesFile.exists()
11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
12 |
13 | def flutterSdkPath = properties.getProperty("flutter.sdk")
14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
16 |
--------------------------------------------------------------------------------
/flutterapp/assets/bottom.svg:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/flutterapp/assets/left.svg:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/flutterapp/assets/right.svg:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/flutterapp/assets/top.svg:
--------------------------------------------------------------------------------
1 |
23 |
--------------------------------------------------------------------------------
/flutterapp/h origin master:
--------------------------------------------------------------------------------
1 | diff.astextplain.textconv=astextplain
2 | filter.lfs.clean=git-lfs clean -- %f
3 | filter.lfs.smudge=git-lfs smudge -- %f
4 | filter.lfs.process=git-lfs filter-process
5 | filter.lfs.required=true
6 | http.sslbackend=openssl
7 | http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
8 | core.autocrlf=true
9 | core.fscache=true
10 | core.symlinks=false
11 | credential.helper=manager
12 | pull.rebase=false
13 | user.name=FlutterKarma
14 | user.email=flutterkarma@gmail.com
15 | core.repositoryformatversion=0
16 | core.filemode=false
17 | core.bare=false
18 | core.logallrefupdates=true
19 | core.symlinks=false
20 | core.ignorecase=true
21 | remote.origin.url=https://github.com/FlutterKarma/esp32cam-car-with-Flutter.git
22 | remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
23 |
--------------------------------------------------------------------------------
/flutterapp/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/flutterapp/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/flutterapp/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/flutterapp/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 97C146F11CF9000F007C117D /* Supporting Files */,
94 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
95 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
96 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
97 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
98 | );
99 | path = Runner;
100 | sourceTree = "";
101 | };
102 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
103 | isa = PBXGroup;
104 | children = (
105 | );
106 | name = "Supporting Files";
107 | sourceTree = "";
108 | };
109 | /* End PBXGroup section */
110 |
111 | /* Begin PBXNativeTarget section */
112 | 97C146ED1CF9000F007C117D /* Runner */ = {
113 | isa = PBXNativeTarget;
114 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
115 | buildPhases = (
116 | 9740EEB61CF901F6004384FC /* Run Script */,
117 | 97C146EA1CF9000F007C117D /* Sources */,
118 | 97C146EB1CF9000F007C117D /* Frameworks */,
119 | 97C146EC1CF9000F007C117D /* Resources */,
120 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
121 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
122 | );
123 | buildRules = (
124 | );
125 | dependencies = (
126 | );
127 | name = Runner;
128 | productName = Runner;
129 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
130 | productType = "com.apple.product-type.application";
131 | };
132 | /* End PBXNativeTarget section */
133 |
134 | /* Begin PBXProject section */
135 | 97C146E61CF9000F007C117D /* Project object */ = {
136 | isa = PBXProject;
137 | attributes = {
138 | LastUpgradeCheck = 1020;
139 | ORGANIZATIONNAME = "";
140 | TargetAttributes = {
141 | 97C146ED1CF9000F007C117D = {
142 | CreatedOnToolsVersion = 7.3.1;
143 | LastSwiftMigration = 1100;
144 | };
145 | };
146 | };
147 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
148 | compatibilityVersion = "Xcode 9.3";
149 | developmentRegion = en;
150 | hasScannedForEncodings = 0;
151 | knownRegions = (
152 | en,
153 | Base,
154 | );
155 | mainGroup = 97C146E51CF9000F007C117D;
156 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
157 | projectDirPath = "";
158 | projectRoot = "";
159 | targets = (
160 | 97C146ED1CF9000F007C117D /* Runner */,
161 | );
162 | };
163 | /* End PBXProject section */
164 |
165 | /* Begin PBXResourcesBuildPhase section */
166 | 97C146EC1CF9000F007C117D /* Resources */ = {
167 | isa = PBXResourcesBuildPhase;
168 | buildActionMask = 2147483647;
169 | files = (
170 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
171 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
172 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
173 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
174 | );
175 | runOnlyForDeploymentPostprocessing = 0;
176 | };
177 | /* End PBXResourcesBuildPhase section */
178 |
179 | /* Begin PBXShellScriptBuildPhase section */
180 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
181 | isa = PBXShellScriptBuildPhase;
182 | buildActionMask = 2147483647;
183 | files = (
184 | );
185 | inputPaths = (
186 | );
187 | name = "Thin Binary";
188 | outputPaths = (
189 | );
190 | runOnlyForDeploymentPostprocessing = 0;
191 | shellPath = /bin/sh;
192 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
193 | };
194 | 9740EEB61CF901F6004384FC /* Run Script */ = {
195 | isa = PBXShellScriptBuildPhase;
196 | buildActionMask = 2147483647;
197 | files = (
198 | );
199 | inputPaths = (
200 | );
201 | name = "Run Script";
202 | outputPaths = (
203 | );
204 | runOnlyForDeploymentPostprocessing = 0;
205 | shellPath = /bin/sh;
206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
207 | };
208 | /* End PBXShellScriptBuildPhase section */
209 |
210 | /* Begin PBXSourcesBuildPhase section */
211 | 97C146EA1CF9000F007C117D /* Sources */ = {
212 | isa = PBXSourcesBuildPhase;
213 | buildActionMask = 2147483647;
214 | files = (
215 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
216 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
217 | );
218 | runOnlyForDeploymentPostprocessing = 0;
219 | };
220 | /* End PBXSourcesBuildPhase section */
221 |
222 | /* Begin PBXVariantGroup section */
223 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C146FB1CF9000F007C117D /* Base */,
227 | );
228 | name = Main.storyboard;
229 | sourceTree = "";
230 | };
231 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
232 | isa = PBXVariantGroup;
233 | children = (
234 | 97C147001CF9000F007C117D /* Base */,
235 | );
236 | name = LaunchScreen.storyboard;
237 | sourceTree = "";
238 | };
239 | /* End PBXVariantGroup section */
240 |
241 | /* Begin XCBuildConfiguration section */
242 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
243 | isa = XCBuildConfiguration;
244 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
245 | buildSettings = {
246 | ALWAYS_SEARCH_USER_PATHS = NO;
247 | CLANG_ANALYZER_NONNULL = YES;
248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
249 | CLANG_CXX_LIBRARY = "libc++";
250 | CLANG_ENABLE_MODULES = YES;
251 | CLANG_ENABLE_OBJC_ARC = YES;
252 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
253 | CLANG_WARN_BOOL_CONVERSION = YES;
254 | CLANG_WARN_COMMA = YES;
255 | CLANG_WARN_CONSTANT_CONVERSION = YES;
256 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
258 | CLANG_WARN_EMPTY_BODY = YES;
259 | CLANG_WARN_ENUM_CONVERSION = YES;
260 | CLANG_WARN_INFINITE_RECURSION = YES;
261 | CLANG_WARN_INT_CONVERSION = YES;
262 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
263 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
264 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
266 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
267 | CLANG_WARN_STRICT_PROTOTYPES = YES;
268 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
269 | CLANG_WARN_UNREACHABLE_CODE = YES;
270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
272 | COPY_PHASE_STRIP = NO;
273 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
274 | ENABLE_NS_ASSERTIONS = NO;
275 | ENABLE_STRICT_OBJC_MSGSEND = YES;
276 | GCC_C_LANGUAGE_STANDARD = gnu99;
277 | GCC_NO_COMMON_BLOCKS = YES;
278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
280 | GCC_WARN_UNDECLARED_SELECTOR = YES;
281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
282 | GCC_WARN_UNUSED_FUNCTION = YES;
283 | GCC_WARN_UNUSED_VARIABLE = YES;
284 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
285 | MTL_ENABLE_DEBUG_INFO = NO;
286 | SDKROOT = iphoneos;
287 | SUPPORTED_PLATFORMS = iphoneos;
288 | TARGETED_DEVICE_FAMILY = "1,2";
289 | VALIDATE_PRODUCT = YES;
290 | };
291 | name = Profile;
292 | };
293 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
294 | isa = XCBuildConfiguration;
295 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
296 | buildSettings = {
297 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
298 | CLANG_ENABLE_MODULES = YES;
299 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
300 | ENABLE_BITCODE = NO;
301 | FRAMEWORK_SEARCH_PATHS = (
302 | "$(inherited)",
303 | "$(PROJECT_DIR)/Flutter",
304 | );
305 | INFOPLIST_FILE = Runner/Info.plist;
306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
307 | LIBRARY_SEARCH_PATHS = (
308 | "$(inherited)",
309 | "$(PROJECT_DIR)/Flutter",
310 | );
311 | PRODUCT_BUNDLE_IDENTIFIER = com.example.gamepad;
312 | PRODUCT_NAME = "$(TARGET_NAME)";
313 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
314 | SWIFT_VERSION = 5.0;
315 | VERSIONING_SYSTEM = "apple-generic";
316 | };
317 | name = Profile;
318 | };
319 | 97C147031CF9000F007C117D /* Debug */ = {
320 | isa = XCBuildConfiguration;
321 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
322 | buildSettings = {
323 | ALWAYS_SEARCH_USER_PATHS = NO;
324 | CLANG_ANALYZER_NONNULL = YES;
325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
326 | CLANG_CXX_LIBRARY = "libc++";
327 | CLANG_ENABLE_MODULES = YES;
328 | CLANG_ENABLE_OBJC_ARC = YES;
329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
330 | CLANG_WARN_BOOL_CONVERSION = YES;
331 | CLANG_WARN_COMMA = YES;
332 | CLANG_WARN_CONSTANT_CONVERSION = YES;
333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
335 | CLANG_WARN_EMPTY_BODY = YES;
336 | CLANG_WARN_ENUM_CONVERSION = YES;
337 | CLANG_WARN_INFINITE_RECURSION = YES;
338 | CLANG_WARN_INT_CONVERSION = YES;
339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
340 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
341 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
344 | CLANG_WARN_STRICT_PROTOTYPES = YES;
345 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
346 | CLANG_WARN_UNREACHABLE_CODE = YES;
347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
349 | COPY_PHASE_STRIP = NO;
350 | DEBUG_INFORMATION_FORMAT = dwarf;
351 | ENABLE_STRICT_OBJC_MSGSEND = YES;
352 | ENABLE_TESTABILITY = YES;
353 | GCC_C_LANGUAGE_STANDARD = gnu99;
354 | GCC_DYNAMIC_NO_PIC = NO;
355 | GCC_NO_COMMON_BLOCKS = YES;
356 | GCC_OPTIMIZATION_LEVEL = 0;
357 | GCC_PREPROCESSOR_DEFINITIONS = (
358 | "DEBUG=1",
359 | "$(inherited)",
360 | );
361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
363 | GCC_WARN_UNDECLARED_SELECTOR = YES;
364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
365 | GCC_WARN_UNUSED_FUNCTION = YES;
366 | GCC_WARN_UNUSED_VARIABLE = YES;
367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
368 | MTL_ENABLE_DEBUG_INFO = YES;
369 | ONLY_ACTIVE_ARCH = YES;
370 | SDKROOT = iphoneos;
371 | TARGETED_DEVICE_FAMILY = "1,2";
372 | };
373 | name = Debug;
374 | };
375 | 97C147041CF9000F007C117D /* Release */ = {
376 | isa = XCBuildConfiguration;
377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
378 | buildSettings = {
379 | ALWAYS_SEARCH_USER_PATHS = NO;
380 | CLANG_ANALYZER_NONNULL = YES;
381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
382 | CLANG_CXX_LIBRARY = "libc++";
383 | CLANG_ENABLE_MODULES = YES;
384 | CLANG_ENABLE_OBJC_ARC = YES;
385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
386 | CLANG_WARN_BOOL_CONVERSION = YES;
387 | CLANG_WARN_COMMA = YES;
388 | CLANG_WARN_CONSTANT_CONVERSION = YES;
389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
391 | CLANG_WARN_EMPTY_BODY = YES;
392 | CLANG_WARN_ENUM_CONVERSION = YES;
393 | CLANG_WARN_INFINITE_RECURSION = YES;
394 | CLANG_WARN_INT_CONVERSION = YES;
395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
400 | CLANG_WARN_STRICT_PROTOTYPES = YES;
401 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
402 | CLANG_WARN_UNREACHABLE_CODE = YES;
403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
405 | COPY_PHASE_STRIP = NO;
406 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
407 | ENABLE_NS_ASSERTIONS = NO;
408 | ENABLE_STRICT_OBJC_MSGSEND = YES;
409 | GCC_C_LANGUAGE_STANDARD = gnu99;
410 | GCC_NO_COMMON_BLOCKS = YES;
411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
413 | GCC_WARN_UNDECLARED_SELECTOR = YES;
414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415 | GCC_WARN_UNUSED_FUNCTION = YES;
416 | GCC_WARN_UNUSED_VARIABLE = YES;
417 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
418 | MTL_ENABLE_DEBUG_INFO = NO;
419 | SDKROOT = iphoneos;
420 | SUPPORTED_PLATFORMS = iphoneos;
421 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
422 | TARGETED_DEVICE_FAMILY = "1,2";
423 | VALIDATE_PRODUCT = YES;
424 | };
425 | name = Release;
426 | };
427 | 97C147061CF9000F007C117D /* Debug */ = {
428 | isa = XCBuildConfiguration;
429 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
430 | buildSettings = {
431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
432 | CLANG_ENABLE_MODULES = YES;
433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
434 | ENABLE_BITCODE = NO;
435 | FRAMEWORK_SEARCH_PATHS = (
436 | "$(inherited)",
437 | "$(PROJECT_DIR)/Flutter",
438 | );
439 | INFOPLIST_FILE = Runner/Info.plist;
440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
441 | LIBRARY_SEARCH_PATHS = (
442 | "$(inherited)",
443 | "$(PROJECT_DIR)/Flutter",
444 | );
445 | PRODUCT_BUNDLE_IDENTIFIER = com.example.gamepad;
446 | PRODUCT_NAME = "$(TARGET_NAME)";
447 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
448 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
449 | SWIFT_VERSION = 5.0;
450 | VERSIONING_SYSTEM = "apple-generic";
451 | };
452 | name = Debug;
453 | };
454 | 97C147071CF9000F007C117D /* Release */ = {
455 | isa = XCBuildConfiguration;
456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
457 | buildSettings = {
458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
459 | CLANG_ENABLE_MODULES = YES;
460 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
461 | ENABLE_BITCODE = NO;
462 | FRAMEWORK_SEARCH_PATHS = (
463 | "$(inherited)",
464 | "$(PROJECT_DIR)/Flutter",
465 | );
466 | INFOPLIST_FILE = Runner/Info.plist;
467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
468 | LIBRARY_SEARCH_PATHS = (
469 | "$(inherited)",
470 | "$(PROJECT_DIR)/Flutter",
471 | );
472 | PRODUCT_BUNDLE_IDENTIFIER = com.example.gamepad;
473 | PRODUCT_NAME = "$(TARGET_NAME)";
474 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
475 | SWIFT_VERSION = 5.0;
476 | VERSIONING_SYSTEM = "apple-generic";
477 | };
478 | name = Release;
479 | };
480 | /* End XCBuildConfiguration section */
481 |
482 | /* Begin XCConfigurationList section */
483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
484 | isa = XCConfigurationList;
485 | buildConfigurations = (
486 | 97C147031CF9000F007C117D /* Debug */,
487 | 97C147041CF9000F007C117D /* Release */,
488 | 249021D3217E4FDB00AE95B9 /* Profile */,
489 | );
490 | defaultConfigurationIsVisible = 0;
491 | defaultConfigurationName = Release;
492 | };
493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
494 | isa = XCConfigurationList;
495 | buildConfigurations = (
496 | 97C147061CF9000F007C117D /* Debug */,
497 | 97C147071CF9000F007C117D /* Release */,
498 | 249021D4217E4FDB00AE95B9 /* Profile */,
499 | );
500 | defaultConfigurationIsVisible = 0;
501 | defaultConfigurationName = Release;
502 | };
503 | /* End XCConfigurationList section */
504 | };
505 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
506 | }
507 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | gamepad
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/flutterapp/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/flutterapp/lib/homepage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:flutter_neumorphic/flutter_neumorphic.dart';
4 | import 'package:flutterapp/widigts/fourbutton.dart';
5 | import 'package:flutterapp/widigts/screen.dart';
6 | import 'dart:convert';
7 | import 'package:flutter_bluetooth_serial/flutter_bluetooth_serial.dart';
8 | import 'package:flutter/cupertino.dart';
9 | import 'package:flutter_svg/flutter_svg.dart';
10 | import 'package:vibration/vibration.dart';
11 |
12 | class HomePage extends StatefulWidget {
13 | @override
14 | _HomePageState createState() => _HomePageState();
15 | }
16 |
17 | class _HomePageState extends State {
18 | // Initializing the Bluetooth connection state to be unknown
19 | BluetoothState _bluetoothState = BluetoothState.UNKNOWN;
20 | final GlobalKey _scaffoldKey = new GlobalKey();
21 | // Get the instance of the Bluetooth
22 | FlutterBluetoothSerial _bluetooth = FlutterBluetoothSerial.instance;
23 | // Track the Bluetooth connection with the remote device
24 | BluetoothConnection connection;
25 |
26 | int _deviceState;
27 |
28 | bool isDisconnecting = false;
29 | var _isSwitchOn = false;
30 | // To track whether the device is still connected to Bluetooth
31 | bool get isConnected => connection != null && connection.isConnected;
32 |
33 | // Define some variables, which will be required later
34 | List _devicesList = [];
35 | BluetoothDevice _device;
36 | bool _connected = false;
37 | bool _isButtonUnavailable = false;
38 | bool _isScreenOn = false;
39 |
40 | Map colors = {
41 | 'onBorderColor': Colors.green,
42 | 'offBorderColor': Colors.red,
43 | 'neutralBorderColor': Colors.transparent,
44 | 'onTextColor': Colors.green[700],
45 | 'offTextColor': Colors.red[700],
46 | 'neutralTextColor': Colors.blue,
47 | };
48 |
49 | @override
50 | void initState() {
51 | super.initState();
52 | //hide system bar
53 | SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
54 | // Get current state
55 | FlutterBluetoothSerial.instance.state.then((state) {
56 | setState(() {
57 | _bluetoothState = state;
58 | });
59 | });
60 |
61 | _deviceState = 0; // neutral
62 |
63 | // If the bluetooth of the device is not enabled,
64 | // then request permission to turn on bluetooth
65 | // as the app starts up
66 | enableBluetooth();
67 |
68 | // Listen for further state changes
69 | FlutterBluetoothSerial.instance
70 | .onStateChanged()
71 | .listen((BluetoothState state) {
72 | setState(() {
73 | _bluetoothState = state;
74 | if (_bluetoothState == BluetoothState.STATE_OFF) {
75 | _isButtonUnavailable = true;
76 | }
77 | getPairedDevices();
78 | });
79 | });
80 | }
81 |
82 | @override
83 | void dispose() {
84 | // Avoid memory leak and disconnect
85 | if (isConnected) {
86 | isDisconnecting = true;
87 | connection.dispose();
88 | connection = null;
89 | }
90 |
91 | super.dispose();
92 | }
93 |
94 | // Request Bluetooth permission from the user
95 | Future enableBluetooth() async {
96 | // Retrieving the current Bluetooth state
97 | _bluetoothState = await FlutterBluetoothSerial.instance.state;
98 |
99 | // If the bluetooth is off, then turn it on first
100 | // and then retrieve the devices that are paired.
101 | if (_bluetoothState == BluetoothState.STATE_OFF) {
102 | await FlutterBluetoothSerial.instance.requestEnable();
103 | await getPairedDevices();
104 | return true;
105 | } else {
106 | await getPairedDevices();
107 | }
108 | return false;
109 | }
110 |
111 | // For retrieving and storing the paired devices
112 | // in a list.
113 | Future getPairedDevices() async {
114 | List devices = [];
115 |
116 | // To get the list of paired devices
117 | try {
118 | devices = await _bluetooth.getBondedDevices();
119 | } on PlatformException {
120 | print("Error");
121 | }
122 |
123 | // It is an error to call [setState] unless [mounted] is true.
124 | if (!mounted) {
125 | return;
126 | }
127 |
128 | // Store the [devices] list in the [_devicesList] for accessing
129 | // the list outside this class
130 | setState(() {
131 | _devicesList = devices;
132 | });
133 | }
134 |
135 | @override
136 | Widget build(BuildContext context) {
137 | return Scaffold(
138 | key: _scaffoldKey,
139 | backgroundColor: Colors.lightBlue,
140 | body: Padding(
141 | padding: const EdgeInsets.only(
142 | right: 8,
143 | left: 8,
144 | top: 20,
145 | bottom: 5,
146 | ),
147 | child: Stack(
148 | alignment: Alignment.topRight,
149 | children: [
150 | Container(
151 | height: double.infinity,
152 | width: double.infinity,
153 | decoration: BoxDecoration(
154 | borderRadius: BorderRadius.all(Radius.circular(50)),
155 | color: Colors.white),
156 | child: Row(
157 | children: [
158 | SizedBox(
159 | width: 5,
160 | ),
161 | controler(),
162 | SizedBox(
163 | width: 5,
164 | ),
165 | Screen(_isScreenOn),
166 | SizedBox(
167 | width: 5,
168 | ),
169 | fourbutton()
170 | ],
171 | ),
172 | ),
173 | RawMaterialButton(
174 | fillColor: Colors.blue[200],
175 | shape: CircleBorder(),
176 | child: Icon(
177 | Icons.bluetooth,
178 | color: Colors.white,
179 | ),
180 | onPressed: () {
181 | showDialog(
182 | context: context,
183 | builder: (context) {
184 | return Dialog(
185 | elevation: 16,
186 | child: Container(
187 | height: 450.0,
188 | width: 360.0,
189 | child: Container(
190 | child: Column(
191 | mainAxisSize: MainAxisSize.max,
192 | children: [
193 | Visibility(
194 | visible: _isButtonUnavailable &&
195 | _bluetoothState ==
196 | BluetoothState.STATE_ON,
197 | child: LinearProgressIndicator(
198 | backgroundColor: Colors.yellow,
199 | valueColor: AlwaysStoppedAnimation(
200 | Colors.red),
201 | ),
202 | ),
203 | Padding(
204 | padding: const EdgeInsets.all(5),
205 | child: Row(
206 | mainAxisAlignment: MainAxisAlignment.start,
207 | children: [
208 | Expanded(
209 | child: Text(
210 | 'Enable Bluetooth',
211 | style: TextStyle(
212 | color: Colors.black,
213 | fontSize: 16,
214 | ),
215 | ),
216 | ),
217 | Switch(
218 | value: _bluetoothState.isEnabled,
219 | onChanged: (bool value) {
220 | future() async {
221 | if (value) {
222 | await FlutterBluetoothSerial
223 | .instance
224 | .requestEnable();
225 | } else {
226 | await FlutterBluetoothSerial
227 | .instance
228 | .requestDisable();
229 | }
230 |
231 | await getPairedDevices();
232 | _isButtonUnavailable = false;
233 |
234 | if (_connected) {
235 | _disconnect();
236 | }
237 | }
238 |
239 | future().then((_) {
240 | setState(() {});
241 | });
242 | },
243 | )
244 | ],
245 | ),
246 | ),
247 | Stack(
248 | children: [
249 | Column(
250 | children: [
251 | Padding(
252 | padding:
253 | const EdgeInsets.only(top: 8),
254 | child: Text(
255 | "PAIRED DEVICES",
256 | style: TextStyle(
257 | fontSize: 16,
258 | color: Colors.blue),
259 | textAlign: TextAlign.center,
260 | ),
261 | ),
262 | Padding(
263 | padding: const EdgeInsets.all(5.0),
264 | child: Row(
265 | mainAxisAlignment:
266 | MainAxisAlignment.spaceBetween,
267 | children: [
268 | Text(
269 | 'Device:',
270 | style: TextStyle(
271 | fontWeight: FontWeight.bold,
272 | ),
273 | ),
274 | DropdownButton(
275 | items: _getDeviceItems(),
276 | onChanged: (value) => setState(
277 | () => _device = value),
278 | value: _devicesList.isNotEmpty
279 | ? _device
280 | : null,
281 | ),
282 | RaisedButton(
283 | onPressed: _isButtonUnavailable
284 | ? null
285 | : _connected
286 | ? _disconnect
287 | : _connect,
288 | child: Text(_connected
289 | ? 'Disconnect'
290 | : 'Connect'),
291 | ),
292 | ],
293 | ),
294 | ),
295 | Padding(
296 | padding: const EdgeInsets.all(10.0),
297 | child: Card(
298 | shape: RoundedRectangleBorder(
299 | side: new BorderSide(
300 | color: _deviceState == 0
301 | ? colors[
302 | 'neutralBorderColor']
303 | : _deviceState == 1
304 | ? colors[
305 | 'onBorderColor']
306 | : colors[
307 | 'offBorderColor'],
308 | width: 3,
309 | ),
310 | borderRadius:
311 | BorderRadius.circular(4.0),
312 | ),
313 | elevation:
314 | _deviceState == 0 ? 4 : 0,
315 | child: Padding(
316 | padding:
317 | const EdgeInsets.all(8.0),
318 | child: Row(
319 | children: [
320 | Expanded(
321 | child: Text(
322 | "DEVICE 1",
323 | style: TextStyle(
324 | fontSize: 20,
325 | color: _deviceState == 0
326 | ? colors[
327 | 'neutralTextColor']
328 | : _deviceState == 1
329 | ? colors[
330 | 'onTextColor']
331 | : colors[
332 | 'offTextColor'],
333 | ),
334 | ),
335 | ),
336 | ],
337 | ),
338 | ),
339 | ),
340 | ),
341 | ],
342 | ),
343 | ],
344 | ),
345 | Expanded(
346 | child: Padding(
347 | padding: const EdgeInsets.all(10),
348 | child: Center(
349 | child: Column(
350 | mainAxisAlignment:
351 | MainAxisAlignment.center,
352 | children: [
353 | Text(
354 | "NOTE: If you cannot find the device in the list, please pair the device by going to the bluetooth settings",
355 | style: TextStyle(
356 | fontSize: 10,
357 | fontWeight: FontWeight.bold,
358 | color: Colors.red,
359 | ),
360 | ),
361 | RaisedButton(
362 | elevation: 2,
363 | child: Text("Bluetooth Settings"),
364 | onPressed: () {
365 | FlutterBluetoothSerial.instance
366 | .openSettings();
367 | },
368 | ),
369 | ],
370 | ),
371 | ),
372 | ),
373 | )
374 | ],
375 | ),
376 | ),
377 | ),
378 | );
379 | });
380 | },
381 | )
382 | ],
383 | ),
384 | ),
385 | );
386 | }
387 |
388 | List> _getDeviceItems() {
389 | List> items = [];
390 | if (_devicesList.isEmpty) {
391 | items.add(DropdownMenuItem(
392 | child: Text('NONE'),
393 | ));
394 | } else {
395 | _devicesList.forEach((device) {
396 | items.add(DropdownMenuItem(
397 | child: Text(device.name),
398 | value: device,
399 | ));
400 | });
401 | }
402 | return items;
403 | }
404 |
405 | // Method to connect to bluetooth
406 | void _connect() async {
407 | setState(() {
408 | _isButtonUnavailable = true;
409 | });
410 | if (_device == null) {
411 | show('No device selected');
412 | } else {
413 | if (!isConnected) {
414 | await BluetoothConnection.toAddress(_device.address)
415 | .then((_connection) {
416 | print('Connected to the device');
417 | connection = _connection;
418 | setState(() {
419 | _connected = true;
420 | });
421 |
422 | connection.input.listen(null).onDone(() {
423 | if (isDisconnecting) {
424 | print('Disconnecting locally!');
425 | } else {
426 | print('Disconnected remotely!');
427 | }
428 | if (this.mounted) {
429 | setState(() {});
430 | }
431 | });
432 | }).catchError((error) {
433 | print('Cannot connect, exception occurred');
434 | print(error);
435 | });
436 | show('Device connected');
437 |
438 | setState(() => _isButtonUnavailable = false);
439 | }
440 | }
441 | }
442 |
443 | // void _onDataReceived(Uint8List data) {
444 | // // Allocate buffer for parsed data
445 | // int backspacesCounter = 0;
446 | // data.forEach((byte) {
447 | // if (byte == 8 || byte == 127) {
448 | // backspacesCounter++;
449 | // }
450 | // });
451 | // Uint8List buffer = Uint8List(data.length - backspacesCounter);
452 | // int bufferIndex = buffer.length;
453 |
454 | // // Apply backspace control character
455 | // backspacesCounter = 0;
456 | // for (int i = data.length - 1; i >= 0; i--) {
457 | // if (data[i] == 8 || data[i] == 127) {
458 | // backspacesCounter++;
459 | // } else {
460 | // if (backspacesCounter > 0) {
461 | // backspacesCounter--;
462 | // } else {
463 | // buffer[--bufferIndex] = data[i];
464 | // }
465 | // }
466 | // }
467 | // }
468 |
469 | // Method to disconnect bluetooth
470 | void _disconnect() async {
471 | setState(() {
472 | _isButtonUnavailable = true;
473 | _deviceState = 0;
474 | });
475 |
476 | await connection.close();
477 | show('Device disconnected');
478 | if (!connection.isConnected) {
479 | setState(() {
480 | _connected = false;
481 | _isButtonUnavailable = false;
482 | });
483 | }
484 | }
485 |
486 | // Method to send message,
487 | // for turning the Bluetooth device on
488 | void _sendRightMessageToBluetooth() async {
489 | connection.output.add(utf8.encode("1"));
490 | await connection.output.allSent;
491 | show('Device Turned Right');
492 | setState(() {
493 | _deviceState = 1; // device o
494 | });
495 | }
496 |
497 | // Method to send message,
498 | // for turning the Bluetooth device off
499 | void _sendLeftMessageToBluetooth() async {
500 | connection.output.add(utf8.encode("2"));
501 | await connection.output.allSent;
502 | show('Device Turned Left');
503 | setState(() {
504 | _deviceState = -1; // device off
505 | });
506 | }
507 |
508 | // Method to send message,
509 | // for turning the Bluetooth device off
510 | void _sendUpMessageToBluetooth() async {
511 | connection.output.add(utf8.encode("0"));
512 | await connection.output.allSent;
513 | show('Device Turned up');
514 | setState(() {
515 | _deviceState = -1; // device off
516 | });
517 | }
518 |
519 | void _senddownMessageToBluetooth() async {
520 | connection.output.add(utf8.encode("3"));
521 | await connection.output.allSent;
522 | show('Device Turned down');
523 | setState(() {
524 | _deviceState = -1; // device off
525 | });
526 | }
527 |
528 | // Method to show a Snackbar,
529 | // taking message as the text
530 | Future show(
531 | String message, {
532 | Duration duration: const Duration(seconds: 3),
533 | }) async {
534 | await new Future.delayed(new Duration(milliseconds: 100));
535 | _scaffoldKey.currentState.showSnackBar(
536 | new SnackBar(
537 | content: new Text(
538 | message,
539 | ),
540 | duration: duration,
541 | ),
542 | );
543 | }
544 |
545 | //controller
546 |
547 | Widget controler() {
548 | return Column(
549 | mainAxisAlignment: MainAxisAlignment.center,
550 | children: [
551 | Neumorphic(
552 | style: NeumorphicStyle(
553 | shape: NeumorphicShape.convex,
554 | boxShape: NeumorphicBoxShape.circle(),
555 | depth: 10,
556 | oppositeShadowLightSource: false,
557 | shadowLightColor: Colors.white,
558 | color: Colors.grey.withOpacity(0.7)),
559 | child: Container(
560 | height: 150,
561 | width: 150,
562 | decoration: BoxDecoration(shape: BoxShape.circle),
563 | child: Stack(
564 | alignment: Alignment.center,
565 | children: [
566 | Neumorphic(
567 | style: NeumorphicStyle(
568 | shape: NeumorphicShape.convex,
569 | boxShape: NeumorphicBoxShape.circle(),
570 | depth: 10,
571 | shadowLightColor: Colors.white,
572 | color: Colors.grey.withOpacity(0.7)),
573 | child: Container(
574 | height: 100,
575 | width: 100,
576 | decoration: BoxDecoration(shape: BoxShape.circle),
577 | ),
578 | ),
579 | Column(
580 | mainAxisAlignment: MainAxisAlignment.center,
581 | crossAxisAlignment: CrossAxisAlignment.center,
582 | children: [
583 | GestureDetector(
584 | onTap: () {
585 | Vibration.vibrate(
586 | duration: 100,
587 | );
588 | if (_connected) {
589 | _sendUpMessageToBluetooth();
590 | }
591 | },
592 | child: Container(
593 | height: 60,
594 | width: 40,
595 | decoration: BoxDecoration(
596 | color: Colors.black12,
597 | borderRadius: BorderRadius.only(
598 | bottomLeft: Radius.circular(35),
599 | bottomRight: Radius.circular(35))),
600 | child: SvgPicture.asset(
601 | "assets/top.svg",
602 | fit: BoxFit.fill,
603 | )),
604 | ),
605 | Row(
606 | children: [
607 | GestureDetector(
608 | onTap: () {
609 | Vibration.vibrate(
610 | duration: 100,
611 | );
612 | if (_connected) {
613 | _sendLeftMessageToBluetooth();
614 | }
615 | },
616 | child: Container(
617 | height: 40,
618 | width: 60,
619 | child: SvgPicture.asset(
620 | "assets/left.svg",
621 | fit: BoxFit.fill,
622 | ),
623 | decoration: BoxDecoration(
624 | color: Colors.black12,
625 | borderRadius: BorderRadius.only(
626 | topRight: Radius.circular(30),
627 | bottomRight: Radius.circular(30))),
628 | ),
629 | ),
630 | Expanded(child: Container()),
631 | GestureDetector(
632 | onTap: () {
633 | Vibration.vibrate(
634 | duration: 100,
635 | );
636 | if (_connected) {
637 | _sendRightMessageToBluetooth();
638 | }
639 | },
640 | child: Container(
641 | height: 40,
642 | width: 60,
643 | decoration: BoxDecoration(
644 | color: Colors.black12,
645 | borderRadius: BorderRadius.only(
646 | bottomLeft: Radius.circular(30),
647 | topLeft: Radius.circular(30))),
648 | child: SvgPicture.asset(
649 | "assets/right.svg",
650 | fit: BoxFit.fill,
651 | ),
652 | ),
653 | ),
654 | ],
655 | ),
656 | GestureDetector(
657 | onTap: () {
658 | Vibration.vibrate(
659 | duration: 100,
660 | );
661 | if (_connected) {
662 | _senddownMessageToBluetooth();
663 | }
664 | },
665 | child: Container(
666 | height: 50,
667 | width: 40,
668 | decoration: BoxDecoration(
669 | color: Colors.black12,
670 | borderRadius: BorderRadius.only(
671 | topLeft: Radius.circular(30),
672 | topRight: Radius.circular(30))),
673 | child: SvgPicture.asset(
674 | "assets/bottom.svg",
675 | fit: BoxFit.fill,
676 | ),
677 | ),
678 | ),
679 | ],
680 | ),
681 | ],
682 | ),
683 | ),
684 | ),
685 | Padding(
686 | padding: const EdgeInsets.all(8.0),
687 | child: RaisedButton(
688 | onPressed: () {
689 | if (_isScreenOn == false) {
690 | setState(() {
691 | _isScreenOn = true;
692 | });
693 | } else {
694 | setState(() {
695 | _isScreenOn = false;
696 | });
697 | }
698 | },
699 | child: _isScreenOn ? Text("stop") : Text("start"),
700 | color: Colors.grey,
701 | ),
702 | )
703 | ],
704 | );
705 | }
706 | }
707 |
--------------------------------------------------------------------------------
/flutterapp/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import './homepage.dart';
3 | import 'package:flutter/services.dart';
4 |
5 | void main() {
6 | WidgetsFlutterBinding.ensureInitialized();
7 |
8 | SystemChrome.setPreferredOrientations(
9 | [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight])
10 | .then((_) => runApp(new MyApp()));
11 | }
12 |
13 | class MyApp extends StatelessWidget {
14 | @override
15 | Widget build(BuildContext context) {
16 | return MaterialApp(
17 | debugShowCheckedModeBanner: false,
18 | theme: ThemeData.dark(),
19 | title: "Dash Cam App",
20 | home: HomePage(),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/flutterapp/lib/widigts/fourbutton.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_neumorphic/flutter_neumorphic.dart';
4 |
5 | Widget fourbutton() {
6 | return Container(
7 | height: 150,
8 | width: 138,
9 | decoration: BoxDecoration(shape: BoxShape.circle),
10 | child: Column(
11 | mainAxisAlignment: MainAxisAlignment.center,
12 | crossAxisAlignment: CrossAxisAlignment.center,
13 | children: [
14 | Neumorphic(
15 | style: NeumorphicStyle(
16 | shape: NeumorphicShape.convex,
17 | boxShape: NeumorphicBoxShape.circle(),
18 | depth: 10,
19 | shadowLightColor: Colors.white,
20 | color: Colors.grey.withOpacity(0.7)),
21 | child: Container(
22 | height: 50,
23 | width: 50,
24 | decoration: BoxDecoration(shape: BoxShape.circle),
25 | child: Icon(
26 | Icons.change_history,
27 | size: 45,
28 | color: Colors.lightGreen,
29 | ),
30 | ),
31 | ),
32 | Expanded(child: Container()),
33 | Row(
34 | children: [
35 | Neumorphic(
36 | style: NeumorphicStyle(
37 | shape: NeumorphicShape.convex,
38 | boxShape: NeumorphicBoxShape.circle(),
39 | depth: 10,
40 | shadowLightColor: Colors.white,
41 | color: Colors.grey.withOpacity(0.7)),
42 | child: Container(
43 | height: 50,
44 | width: 50,
45 | decoration: BoxDecoration(shape: BoxShape.circle),
46 | child: Icon(
47 | Icons.crop_square,
48 | size: 45,
49 | color: Colors.purple,
50 | ),
51 | ),
52 | ),
53 | Expanded(child: Container()),
54 | Neumorphic(
55 | style: NeumorphicStyle(
56 | shape: NeumorphicShape.convex,
57 | boxShape: NeumorphicBoxShape.circle(),
58 | depth: 10,
59 | shadowLightColor: Colors.white,
60 | color: Colors.grey.withOpacity(0.7)),
61 | child: Container(
62 | height: 50,
63 | width: 50,
64 | decoration: BoxDecoration(shape: BoxShape.circle),
65 | child: Icon(
66 | Icons.panorama_fish_eye,
67 | size: 45,
68 | color: Colors.pinkAccent,
69 | ),
70 | ),
71 | )
72 | ],
73 | ),
74 | Expanded(child: Container()),
75 | Neumorphic(
76 | style: NeumorphicStyle(
77 | shape: NeumorphicShape.convex,
78 | boxShape: NeumorphicBoxShape.circle(),
79 | depth: 10,
80 | shadowLightColor: Colors.white,
81 | color: Colors.grey.withOpacity(0.7)),
82 | child: Container(
83 | height: 50,
84 | width: 50,
85 | decoration: BoxDecoration(shape: BoxShape.circle),
86 | child: Icon(
87 | Icons.close,
88 | size: 45,
89 | color: Colors.blueAccent,
90 | ),
91 | ),
92 | )
93 | ],
94 | ),
95 | );
96 | }
97 |
--------------------------------------------------------------------------------
/flutterapp/lib/widigts/screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_neumorphic/flutter_neumorphic.dart';
3 |
4 | import 'package:webview_flutter/webview_flutter.dart';
5 | import 'package:flutter_spinkit/flutter_spinkit.dart';
6 |
7 | class Screen extends StatefulWidget {
8 | final bool _isScreenOn;
9 | Screen(this._isScreenOn);
10 | @override
11 | _ScreenState createState() => _ScreenState();
12 | }
13 |
14 | class _ScreenState extends State {
15 | @override
16 | Widget build(BuildContext context) {
17 | return Neumorphic(
18 | style: NeumorphicStyle(
19 | shape: NeumorphicShape.flat,
20 | depth: -3,
21 | surfaceIntensity: 10,
22 | shadowDarkColor: Colors.black,
23 | border: NeumorphicBorder(
24 | color: Color(0x33000000),
25 | width: 2,
26 | )),
27 | child: widget._isScreenOn
28 | ? Container(
29 | height: 240,
30 | width: 320,
31 | child: WebView(
32 | initialUrl: "http://192.168.225.97",
33 | ))
34 | : Container(
35 | height: 240,
36 | width: 320,
37 | ));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/flutterapp/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.4.1"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "2.0.0"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.3"
25 | clock:
26 | dependency: transitive
27 | description:
28 | name: clock
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.1"
32 | collection:
33 | dependency: transitive
34 | description:
35 | name: collection
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.14.12"
39 | convert:
40 | dependency: transitive
41 | description:
42 | name: convert
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "2.1.1"
46 | cupertino_icons:
47 | dependency: "direct main"
48 | description:
49 | name: cupertino_icons
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "0.1.3"
53 | fake_async:
54 | dependency: transitive
55 | description:
56 | name: fake_async
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "1.1.0"
60 | fixnum:
61 | dependency: transitive
62 | description:
63 | name: fixnum
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "0.10.11"
67 | flutter:
68 | dependency: "direct main"
69 | description: flutter
70 | source: sdk
71 | version: "0.0.0"
72 | flutter_blue:
73 | dependency: "direct main"
74 | description:
75 | name: flutter_blue
76 | url: "https://pub.dartlang.org"
77 | source: hosted
78 | version: "0.7.2"
79 | flutter_bluetooth_serial:
80 | dependency: "direct main"
81 | description:
82 | name: flutter_bluetooth_serial
83 | url: "https://pub.dartlang.org"
84 | source: hosted
85 | version: "0.2.2"
86 | flutter_neumorphic:
87 | dependency: "direct main"
88 | description:
89 | name: flutter_neumorphic
90 | url: "https://pub.dartlang.org"
91 | source: hosted
92 | version: "3.0.1"
93 | flutter_spinkit:
94 | dependency: "direct main"
95 | description:
96 | name: flutter_spinkit
97 | url: "https://pub.dartlang.org"
98 | source: hosted
99 | version: "4.1.2+1"
100 | flutter_svg:
101 | dependency: "direct main"
102 | description:
103 | name: flutter_svg
104 | url: "https://pub.dartlang.org"
105 | source: hosted
106 | version: "0.17.4"
107 | flutter_test:
108 | dependency: "direct dev"
109 | description: flutter
110 | source: sdk
111 | version: "0.0.0"
112 | flutter_webview_plugin:
113 | dependency: "direct main"
114 | description:
115 | name: flutter_webview_plugin
116 | url: "https://pub.dartlang.org"
117 | source: hosted
118 | version: "0.3.11"
119 | matcher:
120 | dependency: transitive
121 | description:
122 | name: matcher
123 | url: "https://pub.dartlang.org"
124 | source: hosted
125 | version: "0.12.6"
126 | meta:
127 | dependency: transitive
128 | description:
129 | name: meta
130 | url: "https://pub.dartlang.org"
131 | source: hosted
132 | version: "1.1.8"
133 | path:
134 | dependency: transitive
135 | description:
136 | name: path
137 | url: "https://pub.dartlang.org"
138 | source: hosted
139 | version: "1.7.0"
140 | path_drawing:
141 | dependency: transitive
142 | description:
143 | name: path_drawing
144 | url: "https://pub.dartlang.org"
145 | source: hosted
146 | version: "0.4.1"
147 | path_parsing:
148 | dependency: transitive
149 | description:
150 | name: path_parsing
151 | url: "https://pub.dartlang.org"
152 | source: hosted
153 | version: "0.1.4"
154 | petitparser:
155 | dependency: transitive
156 | description:
157 | name: petitparser
158 | url: "https://pub.dartlang.org"
159 | source: hosted
160 | version: "2.4.0"
161 | protobuf:
162 | dependency: transitive
163 | description:
164 | name: protobuf
165 | url: "https://pub.dartlang.org"
166 | source: hosted
167 | version: "1.0.1"
168 | rxdart:
169 | dependency: transitive
170 | description:
171 | name: rxdart
172 | url: "https://pub.dartlang.org"
173 | source: hosted
174 | version: "0.24.1"
175 | sky_engine:
176 | dependency: transitive
177 | description: flutter
178 | source: sdk
179 | version: "0.0.99"
180 | source_span:
181 | dependency: transitive
182 | description:
183 | name: source_span
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "1.7.0"
187 | stack_trace:
188 | dependency: transitive
189 | description:
190 | name: stack_trace
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "1.9.3"
194 | stream_channel:
195 | dependency: transitive
196 | description:
197 | name: stream_channel
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "2.0.0"
201 | string_scanner:
202 | dependency: transitive
203 | description:
204 | name: string_scanner
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "1.0.5"
208 | term_glyph:
209 | dependency: transitive
210 | description:
211 | name: term_glyph
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "1.1.0"
215 | test_api:
216 | dependency: transitive
217 | description:
218 | name: test_api
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "0.2.16"
222 | typed_data:
223 | dependency: transitive
224 | description:
225 | name: typed_data
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "1.1.6"
229 | vector_math:
230 | dependency: transitive
231 | description:
232 | name: vector_math
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "2.0.8"
236 | vibration:
237 | dependency: "direct main"
238 | description:
239 | name: vibration
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "1.4.0"
243 | webview_flutter:
244 | dependency: "direct main"
245 | description:
246 | name: webview_flutter
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "0.3.22+1"
250 | xml:
251 | dependency: transitive
252 | description:
253 | name: xml
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "3.6.1"
257 | sdks:
258 | dart: ">=2.7.0 <3.0.0"
259 | flutter: ">=1.13.18 <2.0.0"
260 |
--------------------------------------------------------------------------------
/flutterapp/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutterapp
2 | description: A new Flutter project.
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `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.7.0 <3.0.0"
22 |
23 | dependencies:
24 | flutter:
25 | sdk: flutter
26 |
27 |
28 | # The following adds the Cupertino Icons font to your application.
29 | # Use with the CupertinoIcons class for iOS style icons.
30 | cupertino_icons: ^0.1.3
31 | flutter_svg: ^0.17.4
32 | flutter_neumorphic: ^3.0.1
33 | flutter_webview_plugin: ^0.3.11
34 | webview_flutter: ^0.3.22+1
35 | flutter_blue: ^0.7.2
36 | flutter_bluetooth_serial: ^0.2.2
37 | vibration: ^1.4.0
38 | flutter_spinkit: "^4.1.2"
39 |
40 |
41 | dev_dependencies:
42 | flutter_test:
43 | sdk: flutter
44 |
45 | # For information on the generic Dart part of this file, see the
46 | # following page: https://dart.dev/tools/pub/pubspec
47 |
48 | # The following section is specific to Flutter.
49 | flutter:
50 |
51 | # The following line ensures that the Material Icons font is
52 | # included with your application, so that you can use the icons in
53 | # the material Icons class.
54 | uses-material-design: true
55 |
56 | # To add assets to your application, add an assets section, like this:
57 | assets:
58 | - assets/.
59 |
60 |
61 | # An image asset can refer to one or more resolution-specific "variants", see
62 | # https://flutter.dev/assets-and-images/#resolution-aware.
63 |
64 | # For details regarding adding assets from package dependencies, see
65 | # https://flutter.dev/assets-and-images/#from-packages
66 |
67 | # To add custom fonts to your application, add a fonts section here,
68 | # in this "flutter" section. Each entry in this list should have a
69 | # "family" key with the font family name, and a "fonts" key with a
70 | # list giving the asset and other descriptors for the font. For
71 | # example:
72 | # fonts:
73 | # - family: Schyler
74 | # fonts:
75 | # - asset: fonts/Schyler-Regular.ttf
76 | # - asset: fonts/Schyler-Italic.ttf
77 | # style: italic
78 | # - family: Trajan Pro
79 | # fonts:
80 | # - asset: fonts/TrajanPro.ttf
81 | # - asset: fonts/TrajanPro_Bold.ttf
82 | # weight: 700
83 | #
84 | # For details regarding fonts from package dependencies,
85 | # see https://flutter.dev/custom-fonts/#from-packages
86 |
--------------------------------------------------------------------------------
/flutterapp/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:flutterapp/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/screenshot/IMG20200724144254-removebg-preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/screenshot/IMG20200724144254-removebg-preview.png
--------------------------------------------------------------------------------
/screenshot/Screenshot_2020-07-24-14-51-21-96_8ebf8e7a4cd0bbdae5e9759fa195ed73.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/screenshot/Screenshot_2020-07-24-14-51-21-96_8ebf8e7a4cd0bbdae5e9759fa195ed73.jpg
--------------------------------------------------------------------------------
/screenshot/esp32car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterKarma/esp32cam-car-with-flutter/62a59db10bba70b639900a86416d886236d87283/screenshot/esp32car.png
--------------------------------------------------------------------------------
/videostreamesp32cam/esp32_l298n.cpp:
--------------------------------------------------------------------------------
1 | #include "esp32_l298n.h"
2 |
3 | ESP32_L298N::ESP32_L298N(int pin1, int pin2, int ch1, int ch2, bool is_pwm)
4 | {
5 | pin1_ = pin1;
6 | pin2_ = pin2;
7 | ch1_ = ch1;
8 | ch2_ = ch2;
9 | is_pwm_ = is_pwm;
10 |
11 | pinMode(pin1_, OUTPUT);
12 | pinMode(pin2_, OUTPUT);
13 |
14 | if(is_pwm_){
15 | ledcSetup(ch1_, 12800, 8); // 8bit = 256
16 | ledcSetup(ch2_, 12800, 8);
17 | ledcAttachPin(pin1_, ch1_);
18 | ledcAttachPin(pin2_, ch2_);
19 | }
20 | }
21 |
22 | int ESP32_L298N::speed_limit(int i_speed, int minmax)
23 | {
24 | if (i_speed>=minmax)
25 | return minmax;
26 | else if (i_speed<=-minmax)
27 | return -minmax;
28 | else
29 | return i_speed;
30 | }
31 |
32 | void ESP32_L298N::drive(float speed)
33 | {
34 | int i_speed = speed_limit(int(speed * 255));
35 | if (i_speed>=0) fwd(i_speed);
36 | else rev(-i_speed);
37 | }
38 |
39 | void ESP32_L298N::drive(float speed, int duration)
40 | {
41 | drive(speed);
42 | delay(duration);
43 | }
44 |
45 | void ESP32_L298N::fwd(int i_speed)
46 | {
47 | if(is_pwm_){
48 | ledcWrite(ch1_, i_speed);
49 | ledcWrite(ch2_, 0);
50 | }else{
51 | digitalWrite(pin1_, HIGH);
52 | digitalWrite(pin2_, LOW);
53 | }
54 | }
55 |
56 | void ESP32_L298N::rev(int i_speed)
57 | {
58 | if(is_pwm_){
59 | ledcWrite(ch1_, 0);
60 | ledcWrite(ch2_, i_speed);
61 | }else{
62 | digitalWrite(pin1_, LOW);
63 | digitalWrite(pin2_, HIGH);
64 | }
65 | }
66 |
67 | void ESP32_L298N::brake()
68 | {
69 | if(is_pwm_){
70 | ledcWrite(ch1_, 255);
71 | ledcWrite(ch2_, 255);
72 | }else{
73 | digitalWrite(pin1_, HIGH);
74 | digitalWrite(pin2_, HIGH);
75 | }
76 | }
77 |
78 | void ESP32_L298N::standby()
79 | {
80 | if(is_pwm_){
81 | ledcWrite(ch1_, 0);
82 | ledcWrite(ch2_, 0);
83 | }else{
84 | digitalWrite(pin1_, LOW);
85 | digitalWrite(pin2_, LOW);
86 | }
87 | }
88 |
89 | void ESP32_L298N::test(float speed, int delay_milisec)
90 | {
91 | drive(speed);
92 | delay(delay_milisec);
93 | drive(-speed);
94 | delay(delay_milisec);
95 | brake();
96 | }
97 |
98 | void ESP32_L298N::forward()
99 | {
100 | fwd(1);
101 | delay(50);
102 |
103 | }
104 |
105 | void ESP32_L298N::backward()
106 | {
107 |
108 | rev(1);
109 | delay(50);
110 | }
111 |
--------------------------------------------------------------------------------
/videostreamesp32cam/esp32_l298n.h:
--------------------------------------------------------------------------------
1 | #ifndef ESP32_L298N_h
2 | #define ESP32_L298N_h
3 |
4 | #include "Arduino.h"
5 |
6 | class ESP32_L298N
7 | {
8 | public:
9 | ESP32_L298N(int pin1, int pin2, int ch1=0, int ch2=1, bool is_pwm=false);
10 | void drive(float speed);
11 | void drive(float speed, int duration);
12 | void brake();
13 | void standby();
14 | void test(float speed=1.0, int delay_milisec=500);
15 | void forward();
16 | void backward();
17 | private:
18 | int pin1_, pin2_; // A4, A5, A19, A18, A17, A16, A15, A14, A13, A10, A12, A11
19 | int ch1_, ch2_; // 0~15
20 | bool is_pwm_;
21 | int speed_limit(int i_speed, int minmax=255);
22 | void fwd(int i_speed);
23 | void rev(int i_speed);
24 | };
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/videostreamesp32cam/videostream.ino:
--------------------------------------------------------------------------------
1 | /*********
2 | Rui Santos
3 | Complete project details at https://RandomNerdTutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/
4 |
5 | IMPORTANT!!!
6 | - Select Board "AI Thinker ESP32-CAM"
7 | - GPIO 0 must be connected to GND to upload a sketch
8 | - After connecting GPIO 0 to GND, press the ESP32-CAM on-board RESET button to put your board in flashing mode
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining a copy
11 | of this software and associated documentation files.
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 | *********/
16 |
17 | #include "esp_camera.h"
18 | #include
19 | #include "esp_timer.h"
20 | #include "img_converters.h"
21 | #include "Arduino.h"
22 | #include "fb_gfx.h"
23 | #include "soc/soc.h" //disable brownout problems
24 | #include "soc/rtc_cntl_reg.h" //disable brownout problems
25 | #include "esp_http_server.h"
26 | #include "esp32_l298n.h"
27 | #include "BluetoothSerial.h" //Header File for Serial Bluetooth, will be added by default into Arduino
28 | //motor configer
29 | ESP32_L298N motor_left = ESP32_L298N(13, 12);
30 | ESP32_L298N motor_right = ESP32_L298N(14, 15);
31 | BluetoothSerial ESP_BT; //Object for Bluetooth
32 |
33 | int incoming;
34 | //Replace with your network credentials
35 | const char* ssid = "JioFi3_04D045";
36 | const char* password = "ashish246";
37 |
38 | #define PART_BOUNDARY "123456789000000000000987654321"
39 |
40 | // This project was tested with the AI Thinker Model, M5STACK PSRAM Model and M5STACK WITHOUT PSRAM
41 | #define CAMERA_MODEL_AI_THINKER
42 | //#define CAMERA_MODEL_M5STACK_PSRAM
43 | //#define CAMERA_MODEL_M5STACK_WITHOUT_PSRAM
44 |
45 | // Not tested with this model
46 | //#define CAMERA_MODEL_WROVER_KIT
47 |
48 | #if defined(CAMERA_MODEL_WROVER_KIT)
49 | #define PWDN_GPIO_NUM -1
50 | #define RESET_GPIO_NUM -1
51 | #define XCLK_GPIO_NUM 21
52 | #define SIOD_GPIO_NUM 26
53 | #define SIOC_GPIO_NUM 27
54 |
55 | #define Y9_GPIO_NUM 35
56 | #define Y8_GPIO_NUM 34
57 | #define Y7_GPIO_NUM 39
58 | #define Y6_GPIO_NUM 36
59 | #define Y5_GPIO_NUM 19
60 | #define Y4_GPIO_NUM 18
61 | #define Y3_GPIO_NUM 5
62 | #define Y2_GPIO_NUM 4
63 | #define VSYNC_GPIO_NUM 25
64 | #define HREF_GPIO_NUM 23
65 | #define PCLK_GPIO_NUM 22
66 |
67 | #elif defined(CAMERA_MODEL_M5STACK_PSRAM)
68 | #define PWDN_GPIO_NUM -1
69 | #define RESET_GPIO_NUM 15
70 | #define XCLK_GPIO_NUM 27
71 | #define SIOD_GPIO_NUM 25
72 | #define SIOC_GPIO_NUM 23
73 |
74 | #define Y9_GPIO_NUM 19
75 | #define Y8_GPIO_NUM 36
76 | #define Y7_GPIO_NUM 18
77 | #define Y6_GPIO_NUM 39
78 | #define Y5_GPIO_NUM 5
79 | #define Y4_GPIO_NUM 34
80 | #define Y3_GPIO_NUM 35
81 | #define Y2_GPIO_NUM 32
82 | #define VSYNC_GPIO_NUM 22
83 | #define HREF_GPIO_NUM 26
84 | #define PCLK_GPIO_NUM 21
85 |
86 | #elif defined(CAMERA_MODEL_M5STACK_WITHOUT_PSRAM)
87 | #define PWDN_GPIO_NUM -1
88 | #define RESET_GPIO_NUM 15
89 | #define XCLK_GPIO_NUM 27
90 | #define SIOD_GPIO_NUM 25
91 | #define SIOC_GPIO_NUM 23
92 |
93 | #define Y9_GPIO_NUM 19
94 | #define Y8_GPIO_NUM 36
95 | #define Y7_GPIO_NUM 18
96 | #define Y6_GPIO_NUM 39
97 | #define Y5_GPIO_NUM 5
98 | #define Y4_GPIO_NUM 34
99 | #define Y3_GPIO_NUM 35
100 | #define Y2_GPIO_NUM 17
101 | #define VSYNC_GPIO_NUM 22
102 | #define HREF_GPIO_NUM 26
103 | #define PCLK_GPIO_NUM 21
104 |
105 | #elif defined(CAMERA_MODEL_AI_THINKER)
106 | #define PWDN_GPIO_NUM 32
107 | #define RESET_GPIO_NUM -1
108 | #define XCLK_GPIO_NUM 0
109 | #define SIOD_GPIO_NUM 26
110 | #define SIOC_GPIO_NUM 27
111 |
112 | #define Y9_GPIO_NUM 35
113 | #define Y8_GPIO_NUM 34
114 | #define Y7_GPIO_NUM 39
115 | #define Y6_GPIO_NUM 36
116 | #define Y5_GPIO_NUM 21
117 | #define Y4_GPIO_NUM 19
118 | #define Y3_GPIO_NUM 18
119 | #define Y2_GPIO_NUM 5
120 | #define VSYNC_GPIO_NUM 25
121 | #define HREF_GPIO_NUM 23
122 | #define PCLK_GPIO_NUM 22
123 | #else
124 | #error "Camera model not selected"
125 | #endif
126 |
127 | static const char* _STREAM_CONTENT_TYPE = "multipart/x-mixed-replace;boundary=" PART_BOUNDARY;
128 | static const char* _STREAM_BOUNDARY = "\r\n--" PART_BOUNDARY "\r\n";
129 | static const char* _STREAM_PART = "Content-Type: image/jpeg\r\nContent-Length: %u\r\n\r\n";
130 |
131 | httpd_handle_t stream_httpd = NULL;
132 |
133 | static esp_err_t stream_handler(httpd_req_t *req){
134 | camera_fb_t * fb = NULL;
135 | esp_err_t res = ESP_OK;
136 | size_t _jpg_buf_len = 0;
137 | uint8_t * _jpg_buf = NULL;
138 | char * part_buf[64];
139 |
140 | res = httpd_resp_set_type(req, _STREAM_CONTENT_TYPE);
141 | if(res != ESP_OK){
142 | return res;
143 | }
144 |
145 | while(true){
146 | fb = esp_camera_fb_get();
147 | if (!fb) {
148 | Serial.println("Camera capture failed");
149 | res = ESP_FAIL;
150 | } else {
151 | if(fb->width > 250){
152 | if(fb->format != PIXFORMAT_JPEG){
153 | bool jpeg_converted = frame2jpg(fb, 80, &_jpg_buf, &_jpg_buf_len);
154 | esp_camera_fb_return(fb);
155 | fb = NULL;
156 | if(!jpeg_converted){
157 | Serial.println("JPEG compression failed");
158 | res = ESP_FAIL;
159 | }
160 | } else {
161 | _jpg_buf_len = fb->len;
162 | _jpg_buf = fb->buf;
163 | }
164 | }
165 | }
166 | if(res == ESP_OK){
167 | size_t hlen = snprintf((char *)part_buf, 64, _STREAM_PART, _jpg_buf_len);
168 | res = httpd_resp_send_chunk(req, (const char *)part_buf, hlen);
169 | }
170 | if(res == ESP_OK){
171 | res = httpd_resp_send_chunk(req, (const char *)_jpg_buf, _jpg_buf_len);
172 | }
173 | if(res == ESP_OK){
174 | res = httpd_resp_send_chunk(req, _STREAM_BOUNDARY, strlen(_STREAM_BOUNDARY));
175 | }
176 | if(fb){
177 | esp_camera_fb_return(fb);
178 | fb = NULL;
179 | _jpg_buf = NULL;
180 | } else if(_jpg_buf){
181 | free(_jpg_buf);
182 | _jpg_buf = NULL;
183 | }
184 | if(res != ESP_OK){
185 | break;
186 | }
187 | //Serial.printf("MJPG: %uB\n",(uint32_t)(_jpg_buf_len));
188 | }
189 | return res;
190 | }
191 |
192 | void startCameraServer(){
193 | httpd_config_t config = HTTPD_DEFAULT_CONFIG();
194 | config.server_port = 80;
195 |
196 | httpd_uri_t index_uri = {
197 | .uri = "/",
198 | .method = HTTP_GET,
199 | .handler = stream_handler,
200 | .user_ctx = NULL
201 | };
202 |
203 | //Serial.printf("Starting web server on port: '%d'\n", config.server_port);
204 | if (httpd_start(&stream_httpd, &config) == ESP_OK) {
205 | httpd_register_uri_handler(stream_httpd, &index_uri);
206 | }
207 | }
208 |
209 | void setup() {
210 | WRITE_PERI_REG(RTC_CNTL_BROWN_OUT_REG, 0); //disable brownout detector
211 |
212 | Serial.begin(115200);
213 | Serial.setDebugOutput(false);
214 |
215 | camera_config_t config;
216 | config.ledc_channel = LEDC_CHANNEL_0;
217 | config.ledc_timer = LEDC_TIMER_0;
218 | config.pin_d0 = Y2_GPIO_NUM;
219 | config.pin_d1 = Y3_GPIO_NUM;
220 | config.pin_d2 = Y4_GPIO_NUM;
221 | config.pin_d3 = Y5_GPIO_NUM;
222 | config.pin_d4 = Y6_GPIO_NUM;
223 | config.pin_d5 = Y7_GPIO_NUM;
224 | config.pin_d6 = Y8_GPIO_NUM;
225 | config.pin_d7 = Y9_GPIO_NUM;
226 | config.pin_xclk = XCLK_GPIO_NUM;
227 | config.pin_pclk = PCLK_GPIO_NUM;
228 | config.pin_vsync = VSYNC_GPIO_NUM;
229 | config.pin_href = HREF_GPIO_NUM;
230 | config.pin_sscb_sda = SIOD_GPIO_NUM;
231 | config.pin_sscb_scl = SIOC_GPIO_NUM;
232 | config.pin_pwdn = PWDN_GPIO_NUM;
233 | config.pin_reset = RESET_GPIO_NUM;
234 | config.xclk_freq_hz = 20000000;
235 | config.pixel_format = PIXFORMAT_JPEG;
236 |
237 | if(psramFound()){
238 | config.frame_size = FRAMESIZE_QVGA;
239 | config.jpeg_quality = 10;
240 | config.fb_count = 2;
241 | } else {
242 | config.frame_size = FRAMESIZE_QVGA;
243 | config.jpeg_quality = 12;
244 | config.fb_count = 1;
245 | }
246 |
247 | // Camera init
248 | esp_err_t err = esp_camera_init(&config);
249 | if (err != ESP_OK) {
250 | Serial.printf("Camera init failed with error 0x%x", err);
251 | return;
252 | }
253 | // Wi-Fi connection
254 | WiFi.begin(ssid, password);
255 | while (WiFi.status() != WL_CONNECTED) {
256 | delay(500);
257 | Serial.print(".");
258 | }
259 | Serial.println("");
260 | Serial.println("WiFi connected");
261 |
262 | Serial.print("Camera Stream Ready! Go to: http://");
263 | Serial.print(WiFi.localIP());
264 |
265 | ESP_BT.begin("remote car"); //Name of your Bluetooth Signal
266 | Serial.println("Bluetooth Device is Ready to Pair");
267 |
268 | // testing
269 | Serial.print("car is connected...");
270 |
271 | motor_left.standby();
272 | motor_right.standby();
273 |
274 | // Start streaming web server
275 | startCameraServer();
276 | }
277 |
278 | void loop() {
279 |
280 | if (ESP_BT.available()) //Check if we receive anything from Bluetooth
281 | {
282 | incoming = ESP_BT.read(); //Read what we recevive
283 | Serial.print("Received:"); Serial.println(incoming);
284 | if (incoming == 48)
285 | {
286 |
287 | Serial.println("up");
288 | motor_left.forward();
289 | motor_right.forward();
290 | delay(1000);
291 | motor_left.brake();
292 | motor_right.brake();
293 | }
294 |
295 | else if (incoming == 50)
296 | {
297 | motor_right.forward();
298 | delay(500);
299 | motor_right.brake();
300 |
301 | Serial.println("left");
302 | ESP_BT.println("left");
303 |
304 |
305 | }
306 | else if(incoming == 51){
307 | Serial.println("back");
308 | ESP_BT.println("back");
309 | motor_left.backward();
310 | motor_right.backward();
311 | delay(1000);
312 | motor_left.brake();
313 | motor_right.brake();
314 |
315 | }
316 | else if(incoming == 49){
317 | Serial.println("right");
318 | ESP_BT.println("right");
319 | motor_left.forward();
320 | delay(500);
321 | motor_left.brake();
322 |
323 |
324 |
325 | }
326 | else if(incoming == 53){
327 | Serial.println("rotate");
328 |
329 | motor_left.forward();
330 | delay(3500);
331 | motor_left.brake();
332 |
333 |
334 |
335 | }
336 |
337 |
338 | // Stop the DC motor
339 |
340 |
341 | // Move DC motor forward with increasing speed
342 |
343 | }
344 | delay(1);
345 | }
346 |
--------------------------------------------------------------------------------