Giter Club home page Giter Club logo

reactnativearduinoble's Introduction

React Native Arduino BLE Example

An example project on how to communicate between an esp32 and a React Native app over Bluetooth low energy A video showing the app can be found here

What is the purpose of this project?

This is a very simple example of how you can communicate over BLE (Bluetooth Low Energy) between an ESP32 (programmed using Arduino) and a React Native App


What does this project do?

It establishes a BLE connection, retrieves the initial Values of two characteristics and monitors them. Then the app has one checkbox to update a value on the ESP side.

It is only compiled for Android at this point but I see no problem with it working for iOS.


Prequesits

  1. You need everything needed for a regular ReactNative App, so NodeJS and a JAVA SDK. Try with the most basic ReactNative Example to make sure your enviroment is working

  2. I am using Visual Studio Code with PlatformIO for the Arduino Programming Android Studio to run the App on a real device since emulators dont have Bluetooth.


Installation

  1. Place the contents of the repository somewhere on your system (manualy or with git) and open the folder in VSCode

  2. run the following command to install all needed libraries

npm install --save

  1. update the Android Studio SDK location in ./android/local.properties

  2. run the following command to launch the app on your connected android phone (make sure it has debugging enabled)

npx react-native run-android

  1. In a seperate VSCode Window open the "Arduino" folder and upload the Code to an ESP32 using PlatformIO

Use

The App should have one button "Connect". Upon hitting that button it should connect to the ESP32 and continously update the Message. When you use the checkbox the Arduino should report that over the Serial Port.


Useful Links

reactnativearduinoble's People

Contributors

palmmaximilian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.