├── LED-master ├── app │ ├── .gitignore │ ├── src │ │ ├── main │ │ │ ├── assets │ │ │ │ └── sanslight.otf │ │ │ ├── ic_launcher-web.png │ │ │ ├── res │ │ │ │ ├── drawable │ │ │ │ │ ├── led.png │ │ │ │ │ ├── cover.png │ │ │ │ │ ├── web_red.png │ │ │ │ │ ├── developer.png │ │ │ │ │ ├── facebook_red.png │ │ │ │ │ ├── twitter_red.png │ │ │ │ │ ├── instagram_red.png │ │ │ │ │ └── rounded_button.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 │ │ │ │ │ ├── dimens.xml │ │ │ │ │ └── strings.xml │ │ │ │ ├── menu │ │ │ │ │ ├── menu_device_list.xml │ │ │ │ │ └── menu_led_control.xml │ │ │ │ ├── values-w820dp │ │ │ │ │ └── dimens.xml │ │ │ │ └── layout │ │ │ │ │ ├── splash.xml │ │ │ │ │ ├── activity_device_list.xml │ │ │ │ │ ├── activity_led_control.xml │ │ │ │ │ └── activity_about.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── led_on_off │ │ │ │ │ └── led │ │ │ │ │ ├── SplashScreen.java │ │ │ │ │ ├── AboutActivity.java │ │ │ │ │ ├── DeviceList.java │ │ │ │ │ └── ledControl.java │ │ │ └── AndroidManifest.xml │ │ └── androidTest │ │ │ └── java │ │ │ └── com │ │ │ └── led_on_off │ │ │ └── led │ │ │ └── ApplicationTest.java │ ├── app-release.apk │ ├── build.gradle │ ├── proguard-rules.pro │ └── app.iml ├── settings.gradle ├── .gitignore ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .idea │ ├── caches │ │ └── build_file_checksums.ser │ ├── modules.xml │ ├── runConfigurations.xml │ ├── gradle.xml │ ├── misc.xml │ └── codeStyles │ │ └── Project.xml ├── build.gradle ├── LED.iml ├── gradle.properties ├── gradlew.bat └── gradlew ├── LED Controller APK └── LED Controller.apk ├── README.md ├── BT_changed_transmission_pins ├── BT_changed_transmission_pins.ino └── README.md └── Arduino Code └── Arduino_Bluetooth_Basic.ino /LED-master/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /LED-master/app/src/main/assets/sanslight.otf: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LED-master/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /LED-master/.gitignore: -------------------------------------------------------------------------------- 1 | .gradle 2 | /local.properties 3 | /.idea/workspace.xml 4 | /.idea/libraries 5 | .DS_Store 6 | /build 7 | -------------------------------------------------------------------------------- /LED-master/app/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/app-release.apk -------------------------------------------------------------------------------- /LED Controller APK/LED Controller.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED Controller APK/LED Controller.apk -------------------------------------------------------------------------------- /LED-master/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/led.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/drawable/led.png -------------------------------------------------------------------------------- /LED-master/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /LED-master/.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/drawable/cover.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/web_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/drawable/web_red.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/developer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/drawable/developer.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/facebook_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/drawable/facebook_red.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/twitter_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/drawable/twitter_red.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/instagram_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/drawable/instagram_red.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mayoogh/Arduino-Bluetooth-Basic/HEAD/LED-master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /LED-master/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LED-master/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /LED-master/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 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-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /LED-master/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | LED 3 | 4 | Hello world! 5 | Settings 6 | ledControl 7 | AboutActivity 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arduino-Bluetooth-Basic 2 | Control a LED using your smartphone via bluetooth 3 | Download the app from here : http://goo.gl/PSXVoF 4 | 5 | Project Documentation can be found [here](http://mgprojecthub.com/arduino-bluetooth-basic-tutorial/) 6 | 7 | 8 |

NOTE : This Application does not support Bluetooth Low Energy (BLE). Only works with SPP

9 | 10 | 11 | -------------------------------------------------------------------------------- /LED-master/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LED-master/app/src/main/res/drawable/rounded_button.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /LED-master/app/src/main/res/menu/menu_device_list.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /LED-master/app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /LED-master/app/src/main/res/menu/menu_led_control.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /LED-master/app/src/androidTest/java/com/led_on_off/led/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.led_on_off.led; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /LED-master/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.5.0' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /BT_changed_transmission_pins/BT_changed_transmission_pins.ino: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | char state = '0'; 5 | 6 | SoftwareSerial BT(3,2); // BT(Tx,Rx) 7 | 8 | void setup() { 9 | BT.begin(9600); // Initialize serial communication at 9600 bits per second 10 | 11 | Serial.begin(9600); 12 | } 13 | void loop() { 14 | 15 | Serial.begin(9600); 16 | if(BT.available()){ 17 | // Reads from bluetooth and stores its value 18 | state = BT.read(); 19 | // Write your Code here 20 | // Better to use switch function 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LED-master/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /LED-master/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 21 5 | buildToolsVersion "21.1.2" 6 | 7 | defaultConfig { 8 | applicationId "com.led.led_on_off" 9 | minSdkVersion 14 10 | targetSdkVersion 21 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | compile 'com.android.support:appcompat-v7:21.0.3' 25 | } 26 | -------------------------------------------------------------------------------- /LED-master/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /LED-master/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\Deyson\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /BT_changed_transmission_pins/README.md: -------------------------------------------------------------------------------- 1 | ## Usage of other GPIO for serial communication 2 | 3 | `BT_changed_transmission_lines.ino` code consist of a library `SoftwareSerial`. 4 | 5 | This Library allows you to select your own Tx and Rx pins. 6 | 7 | For eg: In code, pins (3,2) is taken which means pin 3 of MCU is connected with Rx of BT and pin 2 to Tx of BT. 8 | 9 | The default Tx,Rx pins can be used for other purposes. 10 | 11 | Multiple serial port can be defined using this library 12 | 13 | Syntax : `SoftwareSerial mySerial(receivePin, transmitPin)` 14 | 15 |



16 | 17 | Read more at here [[1]](https://www.arduino.cc/en/Reference.SoftwareSerial) [[2]](https://www.renesas.com/us/en/products/gadget-renesas/reference/gr-adzuki/library-softwareserial.html) 18 | 19 | -------------------------------------------------------------------------------- /LED-master/LED.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /LED-master/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /LED-master/app/src/main/res/layout/splash.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 28 | -------------------------------------------------------------------------------- /LED-master/app/src/main/java/com/led_on_off/led/SplashScreen.java: -------------------------------------------------------------------------------- 1 | package com.led_on_off.led; 2 | import android.app.Activity; 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | 6 | /** 7 | * Created by PEACE on 3/30/2016. 8 | */ 9 | public class SplashScreen extends Activity { 10 | 11 | @Override 12 | protected void onCreate(Bundle savedInstanceState) { 13 | // TODO Auto-generated method stub 14 | super.onCreate(savedInstanceState); 15 | setContentView(R.layout.splash); 16 | 17 | Thread timerThread = new Thread(){ 18 | public void run(){ 19 | try{ 20 | sleep(700); 21 | }catch(InterruptedException e){ 22 | e.printStackTrace(); 23 | }finally{ 24 | Intent intent = new Intent(SplashScreen.this,DeviceList.class); 25 | startActivity(intent); 26 | } 27 | } 28 | }; 29 | timerThread.start(); 30 | } 31 | 32 | @Override 33 | protected void onPause() { 34 | // TODO Auto-generated method stub 35 | super.onPause(); 36 | finish(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Arduino Code/Arduino_Bluetooth_Basic.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * Bluetooh Basic: LED ON OFF - Avishkar 3 | * Coder - Mayoogh Girish 4 | * Website - http://bit.do/Avishkar 5 | * Download the App : 6 | * This program lets you to control a LED on pin 13 of arduino using a bluetooth module 7 | */ 8 | char Incoming_value = 0; //Variable for storing Incoming_value 9 | void setup() 10 | { 11 | Serial.begin(9600); //Sets the data rate in bits per second (baud) for serial data transmission 12 | pinMode(13, OUTPUT); //Sets digital pin 13 as output pin 13 | } 14 | void loop() 15 | { 16 | if(Serial.available() > 0) 17 | { 18 | Incoming_value = Serial.read(); //Read the incoming data and store it into variable Incoming_value 19 | Serial.print(Incoming_value); //Print Value of Incoming_value in Serial monitor 20 | Serial.print("\n"); //New line 21 | if(Incoming_value == '1') //Checks whether value of Incoming_value is equal to 1 22 | digitalWrite(13, HIGH); //If value is 1 then LED turns ON 23 | else if(Incoming_value == '0') //Checks whether value of Incoming_value is equal to 0 24 | digitalWrite(13, LOW); //If value is 0 then LED turns OFF 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /LED-master/app/src/main/java/com/led_on_off/led/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.led_on_off.led; 2 | 3 | import android.content.Intent; 4 | import android.net.Uri; 5 | import android.os.Bundle; 6 | import android.support.v7.app.ActionBarActivity; 7 | import android.view.View; 8 | 9 | public class AboutActivity extends ActionBarActivity 10 | { 11 | 12 | @Override 13 | protected void onCreate(Bundle savedInstanceState) 14 | { 15 | super.onCreate(savedInstanceState); 16 | setContentView(R.layout.activity_about); 17 | } 18 | 19 | public void fb(View view) 20 | { 21 | Intent fbIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.facebook.com/mayoogh")); 22 | startActivity(fbIntent); 23 | } 24 | 25 | public void tweet(View view) 26 | { 27 | Intent tweetIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://twitter.com/mayoogh1997/")); 28 | startActivity(tweetIntent); 29 | } 30 | 31 | public void insta(View view) 32 | { 33 | Intent instaIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://www.instagram.com/mayoogh/")); 34 | startActivity(instaIntent); 35 | } 36 | 37 | 38 | public void web(View view) 39 | { 40 | Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://mayooghgirish.ml")); 41 | startActivity(webIntent); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /LED-master/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /LED-master/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | -------------------------------------------------------------------------------- /LED-master/.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 15 | 16 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /LED-master/app/src/main/res/layout/activity_device_list.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 22 | 23 |