To see how to use this App click here. It is tutorial with a sample project. You can use the App for your own projects.
For this App to work you need to put a Arduino sketch in your Arduino device. To download the Arduino Sketch click here.
Learn various Arduino Commands by Chatting with Arduino. Program and set Arduino Pin functions by sending commands remotely without downloading code.
App is used to program (change pin settings) of Arduino remotely using Bluetooth. You do not need to download programs to change pin settings like pin mode. You can do it remotely using this app.
Its a great tool to learn Arduino in the most fun way by chatting with Arduino.
You can use the sample sketch given here. This sketch can be customized/changed to suit your needs, language and enhance your experience.
[Arduino Sketch]
/******Sketch for App*******/
#include <SoftwareSerial.h> // import the serial library
SoftwareSerial chat(10, 11); // RX, TX
void setup() {
chat.begin(9600);
}
void loop() {
if (chat.available()){
String readStr = "";
readStr=chat.readString();
//pinMode
if(readStr.startsWith("pinMode")){
String pin=readStr.substring(readStr.indexOf("(")+1,readStr.indexOf(","));
int pinNo=pin.toInt();
String mode=readStr.substring(readStr.indexOf(", ")+2,readStr.indexOf(")"));
if(mode=="INPUT"){
pinMode(pinNo, INPUT);}
if(mode=="OUTPUT"){
pinMode(pinNo, OUTPUT);}
if(mode=="INPUT_PULLUP"){
pinMode(pinNo, INPUT_PULLUP);}
chat.println("done");
}
//digitalWrite
if(readStr.startsWith("digitalWrite")){
String pin=readStr.substring(readStr.indexOf("(")+1,readStr.indexOf(","));
int pinNo=pin.toInt();
String value=readStr.substring(readStr.indexOf(", ")+2,readStr.indexOf(")"));
if(value=="HIGH"){
digitalWrite(pinNo, HIGH);}
if(value=="LOW"){
digitalWrite(pinNo, LOW);}
chat.println("done");
}
//digitalRead
if(readStr.startsWith("digitalRead")){
String pin=readStr.substring(readStr.indexOf("(")+1,readStr.indexOf(","));
int pinNo=pin.toInt();
int val=digitalRead(pinNo);
if(val==1){
chat.println("it's HIGH");}
if(val==0){
chat.println("it's LOW");}
}
//analogWrite
if(readStr.startsWith("analogWrite")){
String pin=readStr.substring(readStr.indexOf("(")+1,readStr.indexOf(","));
int pinNo=pin.toInt();
String val=readStr.substring(readStr.indexOf(", ")+2,readStr.indexOf(")"));
int value=val.toInt();
if(pinNo==10 || pinNo==11){
chat.println("You were trying to write on pins which are used by bluetooth RX/TX");// analog write/PWM on pins used by bluetooth can interrupt communication.
}else{
analogWrite(pinNo, value);
chat.println("done");
}
}
//tone
if(readStr.startsWith("tone")){
String pin=readStr.substring(readStr.indexOf("(")+1,readStr.indexOf(","));
int pinNo=pin.toInt();
String frq=readStr.substring(readStr.indexOf(", ")+2,readStr.indexOf(")"));
int frequency=frq.toInt();
String dur=readStr.substring(readStr.lastIndexOf(", ")+2,readStr.indexOf(")"));
int temp=dur.toInt();
long duration=temp*1000;
if(pinNo==10 || pinNo==11){
chat.println("You were trying to write on pins which are used by bluetooth RX/TX");// analog write/PWM on pins used by bluetooth can interrupt communication.
}else{
tone(pinNo, frequency, duration);
chat.println("done");
}
}
//analogRead
if(readStr.startsWith("analogRead")){
String pin=readStr.substring(readStr.indexOf("(")+1,readStr.indexOf(","));
int pinNo=pin.toInt();
int val=analogRead(pinNo);
chat.println("it's " + String(val));
}
}
}
/********end of sketch**********/
Para ver cómo usar esta aplicación, haga clic en aquí. Es un tutorial con un proyecto de muestra. Puedes usar la aplicación para tus propios proyectos.
Para que esta aplicación funcione, debe colocar un boceto de Arduino en su dispositivo Arduino. Para descargar Arduino Sketch, haga clic aquí.
Aprende varios comandos de Arduino chateando con Arduino. Programe y configure las funciones de Arduino Pin enviando comandos de forma remota sin descargar el código.
La aplicación se utiliza para programar (cambiar la configuración de los pines) de Arduino de forma remota mediante Bluetooth. No es necesario descargar programas para cambiar la configuración de los pines, como el modo pin. Puedes hacerlo remotamente usando esta aplicación.
Es una gran herramienta para aprender Arduino de la manera más divertida al chatear con Arduino.
Puedes usar el bosquejo de muestra dado aquí. Este boceto se puede personalizar / cambiar para adaptarlo a sus necesidades, su idioma y mejorar su experiencia.
[Arduino Sketch]
/ ****** Sketch para la aplicación ******* /
#include & lt; SoftwareSerial.h & gt; // importar la librería serial
SoftwareSerial chat (10, 11); // RX, TX
configuración vacía () {
chat.begin (9600);
}
bucle de vacío () {
if (chat.available ()) {
String readStr = "";
readStr = chat.readString ();
// pinMode
if (readStr.startsWith ("pinMode")) {
Pin de cadena = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
Modo de cadena = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")"));
if (modo == "ENTRADA") {
pinMode (pinNo, ENTRADA);}
if (modo == "SALIDA") {
pinMode (pinNo, SALIDA);}
if (mode == "INPUT_PULLUP") {
pinMode (pinNo, INPUT_PULLUP);}
chat.println ("hecho");
}
// escritura digital
if (readStr.startsWith ("digitalWrite")) {
Pin de cadena = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
Valor de cadena = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")"));
if (valor == "ALTO") {
digitalWrite (pinNo, HIGH);}
if (valor == "LOW") {
digitalWrite (pinNo, LOW);}
chat.println ("hecho");
}
// digitalRead
if (readStr.startsWith ("digitalRead")) {
Pin de cadena = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
int val = digitalRead (pinNo);
si (val == 1) {
chat.println ("es ALTO");}
si (val == 0) {
chat.println ("es BAJO");}
}
// analogwrite
if (readStr.startsWith ("analogWrite")) {
Pin de cadena = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
String val = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")"));
valor int = val.toInt ();
si (pinNo == 10 || pinNo == 11) {
chat.println ("Intentaba escribir en los pines que utiliza bluetooth RX / TX"); // la escritura analógica / PWM en los pines que usa bluetooth puede interrumpir la comunicación.
}más{
analogWrite (pinNo, valor);
chat.println ("hecho");
}
}
//tono
if (readStr.startsWith ("tone")) {
Pin de cadena = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
String frq = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")"));
frecuencia int = frq.toInt ();
String dur = readStr.substring (readStr.lastIndexOf (",") + 2, readStr.indexOf (")"));
int temp = dur.toInt ();
larga duración = temp * 1000;
si (pinNo == 10 || pinNo == 11) {
chat.println ("Intentaba escribir en los pines que utiliza bluetooth RX / TX"); // la escritura analógica / PWM en los pines que usa bluetooth puede interrumpir la comunicación.
}más{
tono (pinNo, frecuencia, duración);
chat.println ("hecho");
}
}
// analógicaLeer
if (readStr.startsWith ("analogRead")) {
Pin de cadena = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
int val = analogRead (pinNo);
chat.println ("it's" + String (val));
}
}
}
/ ******** fin del bosquejo ********** /