► Bluetooth BLE and ChatGPT API React Native Project
Developed with the software and tools below.
► 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.
► BLE Connectivity and CHATGPT API usage. The Bluetooth device used for testing was Arduino BLE Sense 33 Rev 2
└── 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
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. |
- Clone the react-native-chatgpt-api repository:
git clone https://github.com/bsanjok/react-native-chatgpt-api
- Change to the project directory:
cd react-native-chatgpt-api
- Install the dependencies:
npm install
npx expo run:android
Contributions are welcome! Here are several ways you can contribute:
- Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Report Issues: Submit bugs found or log feature requests for React-native-chatgpt-api.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a Git client.
git clone https://github.com/bsanjok/react-native-chatgpt-api
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- 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.