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**********/
Untuk melihat cara menggunakan Apl ini klik di sini. Ini adalah tutorial dengan projek sampel. Anda boleh menggunakan App untuk projek anda sendiri.
Untuk App ini untuk berfungsi, anda perlu meletakkan lakaran Arduino dalam peranti Arduino anda. Untuk memuat turun Skrip Arduino klik di sini
Ketahui pelbagai arahan Arduino dengan Chatting dengan Arduino. Program dan tetapkan fungsi Arduino Pin dengan menghantar arahan dari jauh tanpa memuat turun kod.
App digunakan untuk program (menukar tetapan pin) Arduino dari jauh menggunakan Bluetooth. Anda tidak perlu memuat turun program untuk menukar tetapan pin seperti mod pin. Anda boleh melakukannya dari jauh menggunakan aplikasi ini.
Alat yang hebat untuk belajar Arduino dengan cara yang paling menyeronokkan dengan berbual dengan Arduino.
Anda boleh menggunakan lakaran sampel yang diberikan di sini. Lakaran ini boleh disesuaikan / diubah sesuai dengan keperluan anda, bahasa dan meningkatkan pengalaman anda.
[Lakaran Arduino]
/ ****** Lakaran untuk App ******* /
#include & lt; SoftwareSerial.h & gt; / // mengimport perpustakaan bersiri
Sembang perisianSerial (10, 11); // RX, TX
void setup () {
chat.begin (9600);
}
kekosongan gelung () {
jika (chat.available ()) {
String readStr = "";
readStr = chat.readString ();
// pinMode
jika (readStr.startsWith ("pinMode")) {
Pin string = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
Mod rentetan = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")");
jika (mod == "INPUT") {
pinMode (pinNo, INPUT);}
jika (mode == "OUTPUT") {
pinMode (pinNo, OUTPUT);}
jika (mod == "INPUT_PULLUP") {
pinMode (pinNo, INPUT_PULLUP);}
chat.println ("done");
}
// digitalWrite
jika (readStr.startsWith ("digitalWrite")) {
Pin string = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
Nilai rentetan = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")"));
jika (nilai == "TINGGI") {
digitalWrite (pinNo, HIGH);}
jika (nilai == "LOW") {
digitalWrite (pinNo, LOW);}
chat.println ("done");
}
/ digitalRead
jika (readStr.startsWith ("digitalRead")) {
Pin string = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
int val = digitalRead (pinNo);
jika (val == 1) {
chat.println ("itu TINGGI");}
jika (val == 0) {
chat.println ("it LOW");}
}
/ // analogWrite
jika (readStr.startsWith ("analogWrite")) {
Pin string = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
String val = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")");
int value = val.toInt ();
jika (pinNo == 10 || pinNo == 11) {
chat.println ("Anda cuba menulis pada pin yang digunakan oleh bluetooth RX / TX"); // menulis analog / PWM pada pin yang digunakan oleh bluetooth boleh mengganggu komunikasi.
} else {
analogWrite (pinNo, nilai);
chat.println ("done");
}
}
// tone
jika (readStr.startsWith ("nada")) {
Pin string = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
String frq = readStr.substring (readStr.indexOf (",") + 2, readStr.indexOf (")"));
int frekuensi = frq.toInt ();
String dur = readStr.substring (readStr.lastIndexOf (",") + 2, readStr.indexOf (")"));
int temp = dur.toInt ();
durasi panjang = temp * 1000;
jika (pinNo == 10 || pinNo == 11) {
chat.println ("Anda cuba menulis pada pin yang digunakan oleh bluetooth RX / TX"); // menulis analog / PWM pada pin yang digunakan oleh bluetooth boleh mengganggu komunikasi.
} else {
nada (pinNo, kekerapan, tempoh);
chat.println ("done");
}
}
/ // analogRead
jika (readStr.startsWith ("analogRead")) {
Pin string = readStr.substring (readStr.indexOf ("(") + 1, readStr.indexOf (","));
int pinNo = pin.toInt ();
int val = analogRead (pinNo);
chat.println ("it's" + String (val));
}
}
}
/ ******** akhir lakaran ********** /