Skip to content

This mobile application was developed using React Native to communicate with Bluetooth devices and chatgpt API for prompt-based actions. The app allows users to scan for nearby Bluetooth devices, connect to them, and send data based on certain conditions.

Notifications You must be signed in to change notification settings

bsanjok/react-native-ble-chatgpt-api

Repository files navigation

REACT-NATIVE-BLE-&-CHATGPT-API

► Bluetooth BLE and ChatGPT API React Native Project

last-commit repo-top-language repo-language-count

Developed with the software and tools below.

JavaScript Swift C Kotlin React
Buffer Gradle Expo JSON


Quick Links


Overview

► Bluetooth Device Control App This mobile application was developed using React Native to communicate with Bluetooth devices and chatgpt API for prompt-based actions. The app allows users to scan for nearby Bluetooth devices, connect to them, and send data based on certain conditions. Bluetooth Device Scanning: Scan for nearby Bluetooth devices and display them in a list. Device Connection: Connect to Bluetooth devices and manage the connection status. Data Sending: Send data to connected Bluetooth devices based on user input or application logic. Device Status Indicators: Display device connection status and other relevant information. Cross-Platform: Developed using React Native.


Features

► BLE Connectivity and CHATGPT API usage. The Bluetooth device used for testing was Arduino BLE Sense 33 Rev 2


Repository Structure

└── react-native-chatgpt-api/
    ├── App.js
    ├── android
    │   ├── .gitignore
    │   ├── app
    │   │   ├── build.gradle
    │   │   ├── debug.keystore
    │   │   ├── proguard-rules.pro
    │   │   └── src
    │   │       ├── debug
    │   │       │   └── AndroidManifest.xml
    │   │       └── main
    │   │           ├── AndroidManifest.xml
    │   │           ├── java
    │   │           └── res
    │   ├── build.gradle
    │   ├── gradle
    │   │   └── wrapper
    │   │       ├── gradle-wrapper.jar
    │   │       └── gradle-wrapper.properties
    │   ├── gradle.properties
    │   ├── gradlew
    │   ├── gradlew.bat
    │   └── settings.gradle
    ├── app.json
    ├── assets
    │   ├── adaptive-icon.png
    │   ├── background.jpg
    │   ├── favicon.png
    │   ├── icon.png
    │   └── splash.png
    ├── babel.config.js
    ├── eas.json
    ├── ios
    │   ├── .gitignore
    │   ├── .xcode.env
    │   ├── Podfile
    │   ├── Podfile.lock
    │   ├── Podfile.properties.json
    │   ├── homeprj
    │   │   ├── AppDelegate.h
    │   │   ├── AppDelegate.mm
    │   │   ├── Images.xcassets
    │   │   │   ├── AppIcon.appiconset
    │   │   │   │   ├── App-Icon-1024x1024@1x.png
    │   │   │   │   └── Contents.json
    │   │   │   ├── Contents.json
    │   │   │   ├── SplashScreen.imageset
    │   │   │   │   ├── Contents.json
    │   │   │   │   └── image.png
    │   │   │   └── SplashScreenBackground.imageset
    │   │   │       ├── Contents.json
    │   │   │       └── image.png
    │   │   ├── Info.plist
    │   │   ├── SplashScreen.storyboard
    │   │   ├── Supporting
    │   │   │   └── Expo.plist
    │   │   ├── homeprj-Bridging-Header.h
    │   │   ├── homeprj.entitlements
    │   │   ├── main.m
    │   │   └── noop-file.swift
    │   ├── homeprj.xcodeproj
    │   │   ├── project.pbxproj
    │   │   └── xcshareddata
    │   │       └── xcschemes
    │   │           └── homeprj.xcscheme
    │   └── homeprj.xcworkspace
    │       └── contents.xcworkspacedata
    ├── package-lock.json
    ├── package.json
    └── srcs
        ├── AboutMe.js
        ├── AgeRange.js
        ├── BleBroadcaster.js
        ├── BleComponent.js
        ├── DistanceCalculator.js
        ├── GenderForm.js
        ├── GptCalculation.js
        ├── HomeScreen.js
        ├── Notification.js
        ├── OptionInput.js
        ├── StatusBar.js
        ├── optionsManagementPage.js
        └── welcome.js

Modules

srcs
File Summary
GenderForm.js ► Form for selecting Gender.
HomeScreen.js ► Main Navigation Module
OptionInput.js ► Add and edit interests keyword options module.
StatusBar.js ► For status bar configuration.
AboutMe.js ► Uses Chatgpt API to extract interests keywords
BleComponent.js ► Creates new Blemanage object, handles permissions, and enables sending test data.
GptCalculation.js ► Compares personality to calculate score and parse the result received from ChatGPT API
DistanceCalculator.js ► Calculates approximate distance of connected BLE devices based on RSSI value.
welcome.js ► Welcome Screen.

Getting Started

Installation

  1. Clone the react-native-chatgpt-api repository:
git clone https://github.com/bsanjok/react-native-chatgpt-api
  1. Change to the project directory:
cd react-native-chatgpt-api
  1. Install the dependencies:
npm install

Running react-native-chatgpt-api

npx expo run:android


Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a Git client.
    git clone https://github.com/bsanjok/react-native-chatgpt-api
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.

Once your PR is reviewed and approved, it will be merged into the main branch.


Return


About

This mobile application was developed using React Native to communicate with Bluetooth devices and chatgpt API for prompt-based actions. The app allows users to scan for nearby Bluetooth devices, connect to them, and send data based on certain conditions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published