GithubHelp home page GithubHelp logo

oriojas / chat Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.36 MB

Prueba Bluetooth PhoneGap

C++ 0.53% Java 43.29% CSS 1.28% HTML 0.88% JavaScript 10.78% Batchfile 2.74% Objective-C 37.60% C 0.72% Shell 0.24% C# 1.95%

chat's Introduction

Este programa se modificó para intentar recibir un dato cuando se envie un caracter a un dispositivo bluetooth conectado a un arduino mini codigo original:https://github.com/don/BluetoothSerial

Bluetooth Serial Chat Example

This example program demonstrates using the Bluetooth Serial Cordova plugin for communications between a iOS or Android phone and an Arduino. It is not very useful for chat, but it demonstrates sending data to and receiving data from the Arduino. This should help you integrate Bluetooth Serial into your PhoneGap projects.

Some assembly required.

I'll assume you've cloned https://github.com/don/BluetoothSerial into ~/BluetoothSerial

Copy the chat example to a new directory.

$ cp -R ~/BluetoothSerial/examples/Chat ~/Chat

This code requires cordova-cli, which require node.js

$ npm install cordova -g

Adding platforms generates the native projects

$ cd ~/Chat
$ cordova platform add android
$ cordova platform add ios

Install the Bluetooth Serial plugin with cordova

$ cordova plugin add cordova-plugin-bluetooth-serial

This code requires an Android device since the emulator does not support Bluetooth. Pair your Android device the Bluetooth modem running on the Arduino.

Build and deploy to an Android device. (Emulate deploys to the connected device.)

$ cordova run android

The code requires an iOS device, rather than the emulator, since the emulator doesn't support Bluetooth. The iOS version uses Bluetooth Low Energy, so there's no need to pair with the remove device. The iOS code only connects to BLE peripherals running a known UART-like services. See BluetoothSerial the latest list of supported BLE hardware.

Build the code

$ cordova build ios

Open Xcode and deploy to your device

$ open platforms/ios/Chat.xcodeproj

NOTE: Don't edit the HTML or JS in the generated projects. Edit the source in ~/BluetoothSerial/examples/Chat/www and rebuild with cordova-cli.

See the Arduino Folder for Sketches

Red Bear Labs BLEMini
SeeedStudio Bluetooth Shield
Sparkfun Bluetooth Mate Silver

chat's People

Contributors

oriojas avatar

Watchers

 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.