Arduino Forum

Using Arduino => Interfacing w/ Software on the Computer => Topic started by: shev on Aug 22, 2014, 08:47 am

Title: Use RemoteXY for Android communication
Post by: shev on Aug 22, 2014, 08:47 am
I want to talk about interesting service http://remotexy.com/ (http://remotexy.com/) with which to easily connect Arduino with Android smartphone over Bluetooth. This service is different from all the others I looked at, the fact that you can have different buttons, switches, joysticks on the screen of the Android smartphone. In the visual editor you choose these controls and place them anywhere on the screen and in any quantity, in accordance with your task. For example, I will cite a few screenshots of possible interfaces.
(http://remotexy.com/img/screen1.jpg)
(http://remotexy.com/img/screen3.jpg)
(http://remotexy.com/img/screen4.jpg)
Yes, you can put on screen indicators that will display the status of your task in Arduino.
How to use it? It is very simple. After you create your interface in the visual editor, you can get the source code for your Arduino. The source code will be finished sketch that you download directly into Arduino or supplement it with your own tasks. Of course do not forget to connect the Bluetooth module to your board. And that's all. On the download page of RemoteXY service you must download a special application in your Android and can connect with your Arduino and manage them.
For example, you can watch this video
http://www.youtube.com/watch?v=Cjxzi5NaizY (http://www.youtube.com/watch?v=Cjxzi5NaizY)
Title: Re: Android communication over Bluetooth
Post by: Robin2 on Aug 22, 2014, 01:21 pm
It looks interesting but it would be nice to be able to try something without signing up.

Note the spelling - it is SIGN not SING.  Sing is what pop-stars do.

...R
Title: Re: Android communication over Bluetooth
Post by: shev on Aug 22, 2014, 06:10 pm
Quote
It looks interesting but it would be nice to be able to try something without signing up.

Yes, without signing up will be interesting

Quote
Note the spelling - it is SIGN not SING.  Sing is what pop-stars do

Thank! sorry for my English
Title: Re: Android communication over Bluetooth
Post by: Robin2 on Aug 22, 2014, 08:09 pm

Yes, without signing up will be interesting


Do you mean I can try it out and download the code without signing up?

When I tried earlier it immediately asked me to sign up.

...R
Title: Re: Android communication over Bluetooth
Post by: shev on Aug 22, 2014, 08:38 pm
Quote
Do you mean I can try it out and download the code without signing up?

Yes, you can
Title: Re: Android communication over Bluetooth
Post by: Robin2 on Aug 23, 2014, 09:23 am
So you can - that's great.

I am a lot more cautious about downloading an Android application in case of malicious code. How do we get around that problem?

Am I right to assume that the "Download Android Application" button provides a working Android app that includes the controls, etc that I place on the Android screen on your website? In other words every downloaded Android app will be different?

...R
Title: Re: Android communication over Bluetooth
Post by: Erni on Aug 23, 2014, 06:08 pm
I am not sure how this is working.

I tried making a new project in the editor.
I get the files to use with arduino, works OK.

But when i click on the "Download android application"  (on my phone) I am redirected to the Android play shop, where I can download the RemoteXY app.

But this app just does nothing, and are certainly not the app that I made in the editor:

Title: Re: Android communication over Bluetooth
Post by: Robin2 on Aug 23, 2014, 10:07 pm
What Android permissions will the downloaded app have?

...R
Title: Re: Android communication over Bluetooth
Post by: Erni on Aug 24, 2014, 10:47 am
It do not need any permissions. That's the messages I get when downloading.
I don't know if that's what you mean. Normally I don't pay much attention to these messages when downloading apps, maybe I should in the future.
Title: Re: Android communication over Bluetooth
Post by: Robin2 on Aug 24, 2014, 11:02 am

Normally I don't pay much attention to these messages when downloading apps, maybe I should in the future.


Some of the permissions would allow it to spend your money - slightly less worrying if your phone is Pay-as-you-Go.

It could potentially also send illegal SMS messages or download offensive material.

It's an altogether different situation if you write the Android program yourself and you know exactly what is in it.

...R
Title: Re: Android communication over Bluetooth
Post by: shev on Aug 24, 2014, 07:45 pm
No, no, you do not understand the meaning of the project.

1. You get the source code for Arduino
2. In the source code contains information about your controls of interface. See array in remotexy.cpp
3. When connecting Android app, first reads the information about the controls directly from Arduino.
4. After that, the Android app already knows which screen to show and how datas to communicate with Arduino.

This Android app is one same, and it can work with Arduino with absolutely any controls of interface

The source code for Arduino different for each interface
The Android app is always one
By analogy with the browser, Android app acts as a browser for Arduino.
Title: Re: Android communication over Bluetooth
Post by: Erni on Aug 24, 2014, 09:45 pm
Thanks for the clarification shev.

It sounds like an exciting project.
However, I have a problem
When I run your app on my phone and try to connect to my Arduino / bluetooth it makes a connection, but imidietly disconnect again.

I know that my setup works because if I use any other bluetooth app on the phone there is no problem.

Edit:
My bad, I used the hardware serial, instead of pin 2 and 3.
Now it works.
Title: Re: Android communication over Bluetooth
Post by: shev on Dec 22, 2014, 01:24 pm
Developing our project, we have posted a few examples of how you can use the service RemoteXY for remote management.

1. Robo car controlled from a smartphone via Blutooth. The car can be controlled even with the help of G-sensor. In addition, you can develop the functionality of the control, adding new features. In the example project has the full source code and electrical circuits.
http://remotexy.com/en/examples/car/ (http://remotexy.com/en/examples/car/)

(http://remotexy.com/img/example/car_01.jpg)

2. The second project is a fun cardboard robot. The project tells you how to control servo motors. As is pony the source code of the project.
http://remotexy.com/en/examples/cardboardrobot/ (http://remotexy.com/en/examples/cardboardrobot/)

(http://remotexy.com/img/example/cardboardrobot_01.jpg)
Title: Re: Android communication over Bluetooth
Post by: shev on Jan 13, 2015, 05:06 am
And another example of the project for Arduino.
Temperature sensor output values on Android smartphone via Bluetooth, RemoteXY library used.

http://remotexy.com/en/examples/temperature/ (http://remotexy.com/en/examples/temperature/)
and video: http://www.youtube.com/watch?v=lIHD_Najo68 (http://www.youtube.com/watch?v=lIHD_Najo68)

(http://remotexy.com/img/example/example-termometr_01.jpg)

Title: Re: Android communication over Bluetooth
Post by: AiRgeek on Jan 16, 2015, 02:45 am
Wow! This is AWESOME!!  :)

It would be really cool if it is possible to upload your own graphics in the editor for each controls.
Title: Re: Android communication over Bluetooth
Post by: shev on Jan 17, 2015, 06:41 pm
The project involves placing description of interface on the Arduino. This main feature of the project. Arduino does not have enough memory that to save the image of controls. But it can save the pointer of the control element as one of several pre-defined. In the near future, we plan to vary the of pre-defined skins of control elements.
Title: Re: Android communication over Bluetooth
Post by: smartuino on Jan 28, 2015, 08:25 am
RemoteXY is AWESOME! Works like a charm with The AirBoard now live on Kickstarter (https://www.kickstarter.com/projects/223628811/the-airboard-sketch-internet-of-things-fast).
The AirBoard is a thumb-size, Arduino compatible, wireless, ubiquitous computer designed to sketch Internet-of-Things, fast!

(https://dl.dropboxusercontent.com/u/28419819/RemoteXY.gif)
Title: Re: Android communication over Bluetooth
Post by: akurilev on Jan 31, 2015, 06:14 pm
Hi !

Good idea!
Works perfectly - see our robot http://www.youtube.com/watch?v=6lDL4_qh7KM (http://www.youtube.com/watch?v=6lDL4_qh7KM) .

Автору спасибо!
Title: Re: Android communication over Bluetooth
Post by: shev on Mar 11, 2015, 05:03 am
New example RemoteXY project - online GUI creator for remote control via smartphone.
Smart power socket control from your smartphone via Bluetooth.
Full version of project by site http://remotexy.com/en/examples/smartsocket/ (http://remotexy.com/en/examples/smartsocket/)

(http://remotexy.com/img/site/smart-socket_s3.jpg)
(http://remotexy.com/img/site/smart-socket-gui.jpg)

And video http://www.youtube.com/watch?v=QaIM2r83iMA (http://www.youtube.com/watch?v=QaIM2r83iMA)
Title: Re: Android communication over Bluetooth
Post by: ifan on Mar 18, 2015, 03:29 am
(http://s30.postimg.org/doqtj0hdp/Untitled.jpg) (http://postimg.org/image/doqtj0hdp/)
(http://s14.postimg.org/8jjvhakod/N123.jpg) (http://postimg.org/image/8jjvhakod/)

sketch for the design as in the photo how?
for materials
arduino nano
L298N module

please guide me..  :D

/////////////////////////////////////////////
//        RemoteXY include library         //
//   use ANDROID app version 3.1.1 or up   //
/////////////////////////////////////////////

/* RemoteXY select connection mode and include library */
#define REMOTEXY_MODE__SOFTWARESERIAL
#include <SoftwareSerial.h>
#include <RemoteXY.h>

/* RemoteXY connection settings */
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600

/* RemoteXY configurate  */
unsigned char RemoteXY_CONF[] =
  { 5,0,110,0,2,0,2,0,41,13
  ,18,7,6,79,78,0,79,70,70,0
  ,2,0,41,31,18,7,1,79,78,0
  ,79,70,70,0,2,0,41,48,18,7
  ,2,79,78,0,79,70,70,0,4,48
  ,7,8,9,54,1,4,48,83,8,9
  ,54,1,129,0,41,10,17,3,9,76
  ,69,68,32,100,101,112,97,110,0,129
  ,0,41,28,18,3,9,76,69,68,32
  ,116,101,110,103,97,104,0,129,0,42
  ,45,15,3,9,76,69,68,32,98,108
  ,105,110,107,0 };
 
/* this structure defines all the variables of your control interface */
struct {

    /* input variable */
  unsigned char switch_1; /* =1 if switch ON and =0 if OFF */
  unsigned char switch_2; /* =1 if switch ON and =0 if OFF */
  unsigned char switch_3; /* =1 if switch ON and =0 if OFF */
  signed char slider_1; /* =-100..100 slider position */
  signed char slider_2; /* =-100..100 slider position */

    /* other variable */
  unsigned char connect_flag;  /* =1 if wire connected, else =0 */

} RemoteXY;

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_SWITCH_1 13
#define PIN_SWITCH_2 8
#define PIN_SWITCH_3 11


void setup()
{
  RemoteXY_Init ();
 
  pinMode (PIN_SWITCH_1, OUTPUT);
  pinMode (PIN_SWITCH_2, OUTPUT);
  pinMode (PIN_SWITCH_3, OUTPUT);
 

  // TODO you setup code
 
}

void loop()
{
  RemoteXY_Handler ();
 
  digitalWrite(PIN_SWITCH_1, (RemoteXY.switch_1==0)?LOW:HIGH);
  digitalWrite(PIN_SWITCH_2, (RemoteXY.switch_2==0)?LOW:HIGH);
  digitalWrite(PIN_SWITCH_3, (RemoteXY.switch_3==0)?LOW:HIGH);
 

  // TODO you loop code
  // use the RemoteXY structure for data transfer


}
Title: Re: Android communication over Bluetooth
Post by: skydge on Apr 16, 2015, 10:44 pm
shev hello.
I'm trying to set up a project using a arduino mega and remotexy.
I managed to make it work with arduino UNO but I can not connect to the mega.
connecting get the error: "connection is established, but device does not reply: time out error: no response"
You know because it can be?
Title: Re: Android communication over Bluetooth
Post by: shev on Apr 28, 2015, 07:04 pm
Hi,

Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX in SoftwareSerial: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).
https://www.arduino.cc/en/Reference/softwareSerial

If you use MEGA and RemoteXY in SoftwareSerial, use the recommended RX pin. To do this, change the settings in the source code:
#define REMOTEXY_SERIAL_RX 10 // change recommended pin for RX
#define REMOTEXY_SERIAL_TX 11
#define REMOTEXY_SERIAL_SPEED 9600
 
Title: Re: Android communication over Bluetooth
Post by: shev on Apr 28, 2015, 07:10 pm
(http://s30.postimg.org/doqtj0hdp/Untitled.jpg) (http://postimg.org/image/doqtj0hdp/)
(http://s14.postimg.org/8jjvhakod/N123.jpg) (http://postimg.org/image/8jjvhakod/)

sketch for the design as in the photo how?
for materials
arduino nano
L298N module

please guide me..  :D
Please, see the example for L298N by link http://remotexy.com/en/examples/car/ (http://remotexy.com/en/examples/car/)
Title: Re: Android communication over Bluetooth
Post by: Robin2 on Apr 29, 2015, 05:56 pm
I finally got around to trying RemoteXY and I am very impressed. It seems a very easy way to create an Android control screen for an Arduino project.

I had originally misunderstood how it worked and I thought that the Web design page would generate a different Android app for each screen design and I was cautious about downloading unknown Android apps. In the meantime I developed EzScrn (http://forum.arduino.cc/index.php?topic=312547.0) as a simple project for generating a browsed-based interface for controlling an Arduino and without realizing it used a similar concept with all the screen design elements in the Arduino code. That made me understand how RemoteXY works.

Because it uses a Browser for its GUI EzScrn will work on an any device that has a browser which may make it more versatile but, of course, there needs to be a PC or a Yun to run the server. And, unlike RemoteXY, there is no drag-and-drop screen designer for EzScrn.

...R
Title: Re: Android communication over Bluetooth
Post by: terryking228 on Apr 30, 2015, 03:49 pm
Hello Shev,

Very excellent system you have created!

I am working on putting examples on http://ArduinoInfo.Info  Maybe we can work together on this.

I am working with some schools and will be makiing kits for them with our Arduino derivative called YourDuino. The kits will be similar to  THIS: (https://arduino-info.wikispaces.com/YourDuinoEngStarter), but have bluetooth module instead of nRF24l01.  

Question: You show 2 products on Google Play. One is "Bluetooth Arduino control FREE" and the other is "RemoteXY Bluetooth control PRO".  What is the difference?  I need something free for a classroom of students, but some might buy the Pro version themselves. Can you provide an Educational version for a single price?  Maybe we can work together on this. There will probably be 600 of these kits for the September school year.

Another Question: Are you planning an Iphone version?  Android only would be a problem in a classroom.

Thanks for your work on this interesting idea..  
Title: Re: Android communication over Bluetooth
Post by: GoForSmoke on May 03, 2015, 05:34 pm
The project involves placing description of interface on the Arduino. This main feature of the project. Arduino does not have enough memory that to save the image of controls. But it can save the pointer of the control element as one of several pre-defined. In the near future, we plan to vary the of pre-defined skins of control elements.
Perhaps button faces, fonts and like could be on SD files plugged into the Android device? Plug in your own look and feel.

Will this also work for Android wifi tablets? I have Kitkat 4.4. 
Title: Re: Android communication over Bluetooth
Post by: shev on May 06, 2015, 08:53 pm
Question: You show 2 products on Google Play. One is "Bluetooth Arduino control FREE" and the other is "RemoteXY Bluetooth control PRO".  What is the difference?
In FREE version of RemoteXY app is limited the connection via Bluetooth. This time is 30 seconds. Further there is a disconnection. Can to connect again. You can reconnect many times. The display shows the time-remaining counter. 30 seconds should be enough to test, and then go on to the PRO version. You can try and evaluate the application before using the PRO version. Other functional characteristics of the application are identical.
Title: Re: Android communication over Bluetooth
Post by: shev on May 06, 2015, 08:59 pm
Perhaps button faces, fonts and like could be on SD files plugged into the Android device? Plug in your own look and feel.
It is interesting idea. we will think how to do it.

Will this also work for Android wifi tablets? I have Kitkat 4.4.  
It is plan.
Title: Re: Android communication over Bluetooth
Post by: Robin2 on May 07, 2015, 12:19 pm
@shev I think it would be a good idea if you modify your original post and change the title so it reads

Android communication over Bluetooth using RemoteXY


...R
Title: Re: Android communication over Bluetooth
Post by: ondraman on Jun 07, 2015, 04:24 pm
Hi,
your programs looks really nice, I would really like to buy the PRO version, but I have same problem as skydge has.

It can't be paired with bluetooth.
"connection is established, but device does not reply: time out error: no response"

Can you help me?

I tried using many boards /UNO, Nano/, many bluetooth modules /HC-05/, I also tried it on both KitKat and Lollipop devices

Pairing doesn't work even if I connect only VCC and GND, but other apps like Ardurdroid etc. can connect without problems.

Thank you for answer.
Title: Re: Android communication over Bluetooth
Post by: Isaac96 on Jun 09, 2015, 09:51 pm
This is a great app! The idea is amazing as well-embedding the UI in the arduino code? Pure genius! 
What is the difference between the free version and the PRO version?
Will the app work on a 2.2 phone?
Title: Re: Android communication over Bluetooth
Post by: shev on Jun 11, 2015, 02:31 pm
What is the difference between the free version and the PRO version?
FREE version is full, but connection time limited. You can reconnected.

Will the app work on a 2.2 phone?
Yes, Android 2.2 is supported.
Title: Re: Android communication over Bluetooth
Post by: shev on Jun 11, 2015, 02:42 pm
It can't be paired with bluetooth.
"connection is established, but device does not reply: time out error: no response"
It problem means, that Arduino sketch does not reply on request from Android app. Did you upload example sketch in Arduino?
Title: Re: Android communication over Bluetooth
Post by: Isaac96 on Jun 13, 2015, 10:18 pm
So with the free version, it will disconnect after some time?
Title: Re: Android communication over Bluetooth
Post by: Robin2 on Jun 14, 2015, 10:59 am
So with the free version, it will disconnect after some time?
It's a very short time - maybe a minute? (it's a while since I tried it). It is long enough to satisfy yourself that it works, but not long enough to be useful.

...R
Title: Re: Android communication over Bluetooth
Post by: ondraman on Jun 14, 2015, 01:19 pm
It problem means, that Arduino sketch does not reply on request from Android app. Did you upload example sketch in Arduino?
Thanks, problem solved. I just bought a PRO version.

Good Luck :)
Title: Re: Android communication over Bluetooth
Post by: Isaac96 on Jun 14, 2015, 04:39 pm
I just downloaded the app only to find the connection time is only 30 seconds!  >:( I think I will buy the PRO version.
Title: Re: Android communication over Bluetooth
Post by: RedSalsicha on Nov 10, 2015, 02:38 am
Hello.
I would like to verify that it works on Arduino DUE ?? I did some tests and got any success.

Thank you.
Title: Re: Android communication over Bluetooth
Post by: Techlinx on Feb 01, 2016, 07:10 am
Hi, I get error "connection is established but device does not reply". I have the Pro version of RemoteXY and I am sure my Arduino is setup correctly as other apps can show the data being sent from Arduino via bluetooth. I'm using Softserial and tried different pins already. Please help?
Title: Re: Android communication over Bluetooth
Post by: ZKSA on Feb 06, 2016, 07:25 pm
This is an excellent app!!! I use it myself and was just about to recommend it.  Very easy, very useful!!
for those of you concerned about signing up, there are no costs involved for the free version .(I purchased pro from the playstore and payed R59 ZAR for it, thats like 4 dollars.. and its totally worth it!
be warned tho, the GUI (display) is loaded onto the arduino as part of the source code, this makes it very handy because you can connect from any android device and receive the display screen without having to download the new GUI to the phone, but if you are an idiot like me and not aware of this you will search for a way to download this or send it to your android device separately which is not possible.
Excellent app!!! use it!! super easy!!! great explanations and examples!!
Title: Re: Android communication over Bluetooth
Post by: shev on Mar 26, 2016, 12:29 pm
Hi friends!
Added a new feature that allows you to control a remote device via Wi-Fi. Primarily added supports ESP8266 module in access point mode . Your smartphone or tablet can connect to an access point directly.
Connecting to Wi-Fi access point is supported by a mobile app version 3.3.1 or more.
To support the new features updated RemoteXY library for Arduino. New library version 2.1.0 available for download by link http://remotexy.com/en/library/
The library has a hightly modernization, making the work even better. RemotrXY compiled sketches even less, communication speed even higher. The new library is implementing an updated communication protocol, which is supported by a mobile application version 3.3.1 or more.
Using ESP8266 as Wi-Fi access points will increase the communication range compared to the Bluetooth module. Access point mode as well as Bluetooth does not depend on the network infrastructure or the Internet, and allows connect device and smartphone directly.
How to connect the ESP8266 to Arduino can be found in the documentation section by link http://remotexy.com/en/help/esp8266/
(http://remotexy.com/img/help/arduino_esp8266_hard.jpg)
Title: Re: Android communication over Bluetooth
Post by: shev on Apr 03, 2016, 01:59 pm
RemoteXY added a new feature that allows you to control a remote device via the network. Support of Ethernet W5100 shield and ESP8266 module in client mode connect to the access point. With the correct configuration of the router an opportunity to control the device via Internet.
(http://remotexy.com/img/site/w5100overarduino.jpg)
Title: Re: Android communication over Bluetooth
Post by: alanchiu on Apr 18, 2016, 04:37 pm
Hi Guys, I have just tried the RemoteXY apps, it is rather user friendly tools, but I had troubles when connecting with the HC-06 modules, it is just not stable and sometime it gives out message "Connection is established, but device does not reply", does any body came acrossed with this?
Title: Re: Android communication over Bluetooth
Post by: nemmo on Apr 26, 2016, 02:10 pm
Hi, Shev,  may I use a temperature sensor LM35 instead  thermistor 1K in projekt "Температурный датчик с выводом значения на Android смартфон"?
& is it possible to get the temperature on the screen with four points simultaneously?
Thanks.
Title: Re: Android communication over WiFi, Ethernet etc
Post by: pieman on May 04, 2016, 01:20 pm
@shev

If friends buy the pro version can we share our projects with them without the need for them to actually create the project i.e. can we just provide them with a copy of our Arduino sketch?
Title: Re: Android communication over Bluetooth
Post by: shev on May 16, 2016, 06:35 am
@shev

If friends buy the pro version can we share our projects with them without the need for them to actually create the project i.e. can we just provide them with a copy of our Arduino sketch?
Yes, you can!!!
Title: Re: Android communication over Bluetooth
Post by: shev on May 16, 2016, 06:40 am
+++ Vertical orientation!
+++ Multi pages!

RemoteXY project continues to evolve.
Two new features have been added: support for the vertical orientation of the screen and support multi pages of graphical interface.
http://remotexy.com/en/blog/feature_orientation_and_pages/ (http://remotexy.com/en/blog/feature_orientation_and_pages/)

(http://remotexy.com/img/site/vertikalnaya-orientaciya-i-mnogostranichnyj-interfejs_s2.jpg)
Title: Re: Android communication over Bluetooth
Post by: azeo on Jun 18, 2016, 10:32 pm
Great app! Managed to get a nice display up and running via bluetooth on a tablet and a phone communicating with a Nano, brilliant! Really worth the pro fee/donation. ESP8266 next...
Good work Shev, if a clunky old non-programmer like me can get this going, should be great for everyone!
Title: Re: Android communication over Bluetooth
Post by: shev on Aug 25, 2016, 07:05 am
+++ RGB-color control

Added new feature the RGB-color control element. New control allows to set a wide range of color and transmit data to the controller for each color component R, G, B.
http://remotexy.com/en/blog/feature_rgb_color (http://remotexy.com/en/blog/feature_rgb_color)

(http://remotexy.com/img/site/rgb-color-control_s2.jpg)

Title: Re: Android communication over Bluetooth
Post by: shev on Sep 17, 2016, 09:58 am
+++ Edit field cotntrol in RemoteXY!!!

Control "Edit field" is intended to enter a text string or a number from the keypad in the GUI. Input field supports the input arbitrary text, integer and float values.
The edit field will allow to make a more flexible management of your devices, allowing you to enter values from the mobile interface keyboard. These values can be the limit values, the coefficients of PID, the time intervals and other data.
New features supported by the mobile app version 3.7.1 or up.
Tutorial of Edit field by link http://remotexy.com/en/help/controls/edit/ (http://remotexy.com/en/help/controls/edit/).

(http://remotexy.com/img/site/edit-field-blog_s2.jpg)
Title: Re: Android communication over Bluetooth
Post by: pieman on Sep 19, 2016, 01:40 am
@shev,

How do I bailout of RemoteXY mid sketch, gracefully or otherwise?

I have tried things like:

Code: [Select]
    WiFi.mode(WIFI_STA);
    WiFi.begin(ssid, pass);


it drops the AP connection to RemoteXY but it fails to connect to the router in station mode.
Title: Re: Android communication over Bluetooth
Post by: shev on Sep 19, 2016, 03:58 pm
@shev,

How do I bailout of RemoteXY mid sketch, gracefully or otherwise?

I have tried things like:

Code: [Select]
   WiFi.mode(WIFI_STA);
    WiFi.begin(ssid, pass);


it drops the AP connection to RemoteXY but it fails to connect to the router in station mode.
Try use:
Code: [Select]

WiFi.disconnect();
WiFi.softAPdisconnect(true);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, pass);


and you need to deny the call to RemoteXY_Handler (); in loop() function
Title: Re: Use RemoteXY for Android communication
Post by: shev on Sep 21, 2016, 06:56 am
Now you can sharing your RemoteXY projects and your friends could work with it!
Go to "My projects" list and press "Share" button.

(http://remotexy.com/img/help/help_sharing_project.png)
Title: Re: Use RemoteXY for Android communication
Post by: pieman on Sep 21, 2016, 07:36 pm
@shev sharing of projects is a very welcome feature, thanks.


The few lines of code below, in the right sections, are fine to stop RemoteXY running:


Code: [Select]
  bool softAPrunning = true;

  WiFi.softAPdisconnect(true);

  if(softAPrunning == true){  // only call Handler if softAP is still running
    RemoteXY_Handler ();   
  }


I just need to work out how to restart RemoteXY from within my sketch once I have stopped it. I can reset the ESP and that will restart RemoteXY but I would like to do it without a reset.

I have again tried various options, called RemoteXY_Init () and made RemoteXY_Handler() available but no joy.

Any pointers to restart RemoteXY?

Title: Re: Use RemoteXY for Android communication
Post by: kokoscom on Oct 11, 2016, 01:31 pm
Hi

I am trying to Control a ROBOT (simple robot with two motors) + NODEMCU (connected via wi-fi)

I managed to create the following code - however it does not do anything - any suggestions of what would be wrong (code is uploaded --> robot is connected via wifi) - we have tried a simple code (with just two buttons for ON/OFF the motors) and it works fine.

///////////////////////////////////////////// 
//        RemoteXY include library         // 
///////////////////////////////////////////// 

/* RemoteXY select connection mode and include library */ 
#define REMOTEXY_MODE__ESP8266WIFIPOINT_LIB
#include <ESP8266WiFi.h>
#include <RemoteXY.h> 

/* RemoteXY connection settings */
#define REMOTEXY_WIFI_SSID "myrobot"
#define REMOTEXY_WIFI_PASSWORD "12345678"
#define REMOTEXY_SERVER_PORT 6377


/* RemoteXY configurate  */
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 2,0,10,0,6,5,0,5,41,34
  ,14,30,30,2 }; 
   
/* this structure defines all the variables of your control interface */
struct {

    /* input variable */
  int8_t joystick_1_x; /* =-100..100 x-coordinate joystick position */
  int8_t joystick_1_y; /* =-100..100 y-coordinate joystick position */

    /* other variable */
  uint8_t connect_flag;  /* =1 if wire connected, else =0 */

} RemoteXY;
#pragma pack(pop)
///////////////////////////////////////////// 
//           END RemoteXY include          // 
///////////////////////////////////////////// 
/* defined the right motor control pins */
#define PIN_MOTOR_RIGHT_UP  D1
#define PIN_MOTOR_RIGHT_DN D3
#define PIN_MOTOR_RIGHT_SPEED 10

/* defined the left motor control pins */
#define PIN_MOTOR_LEFT_UP D2
#define PIN_MOTOR_LEFT_DN D4
#define PIN_MOTOR_LEFT_SPEED 9

/* defined the LED pin */
#define PIN_LED 13


/* defined two arrays with a list of pins for each motor */
unsigned char RightMotor[3] = 
  {PIN_MOTOR_RIGHT_UP, PIN_MOTOR_RIGHT_DN, PIN_MOTOR_RIGHT_SPEED};
unsigned char LeftMotor[3] = 
  {PIN_MOTOR_LEFT_UP, PIN_MOTOR_LEFT_DN, PIN_MOTOR_LEFT_SPEED};

/*
   speed control of the motor
   motor - pointer to an array of pins
   v - motor speed can be set from -100 to 100
*/
void Wheel (unsigned char * motor, int v)
{
  if (v>100) v=100;
  if (v<-100) v=-100;
  if (v>0) {
    digitalWrite(motor[0], HIGH);
    digitalWrite(motor[1], LOW);
    analogWrite(motor[2], v*2.55);
  }
  else if (v<0) {
    digitalWrite(motor[0], LOW);
    digitalWrite(motor[1], HIGH);
    analogWrite(motor[2], (-v)*2.55);
  }
  else {
    digitalWrite(motor[0], LOW);
    digitalWrite(motor[1], LOW);
    analogWrite(motor[2], 0);
  }
}

void setup()
{
  /* initialization pins */
  pinMode (PIN_MOTOR_RIGHT_UP, OUTPUT);
  pinMode (PIN_MOTOR_RIGHT_DN, OUTPUT);
  pinMode (PIN_MOTOR_LEFT_UP, OUTPUT);
  pinMode (PIN_MOTOR_LEFT_DN, OUTPUT);
  pinMode (PIN_LED, OUTPUT);

  /* initialization module RemoteXY */
  RemoteXY_Init ();

}

void loop()
{
  /* event handler module RemoteXY */
  RemoteXY_Handler ();

  /* manage LED pin */
 
  /* manage the right motor */
  Wheel (RightMotor, RemoteXY.joystick_1_y - RemoteXY.joystick_1_x);
  /* manage the left motor */
  Wheel (LeftMotor, RemoteXY.joystick_1_y + RemoteXY.joystick_1_x);
}
Title: Re: Use RemoteXY for Android communication
Post by: AWOL on Oct 11, 2016, 01:41 pm
Blink some lights, add some debug prints.
Use some code tags.
Don't hijack threads.
Title: Re: Use RemoteXY for Android communication
Post by: scunucchiuz on Nov 01, 2016, 11:51 am
hi friend i have a problem to use yor remotexy editor whit  Wemos D1.

i create a simple code whit remotexy but does not work the wifi.
the setting is :
wifi
wemos d1
esp onboard
ide arduino
 if i load the blink example of arduino ide  he work correctly and i see the wifi signal


if ai load the code edited by your editor ,does not work


for example thie is very simple code i loading in wemos, but does not work:
//////////////////////////////////////////////
//        RemoteXY include library          //
//     use  library  version 2.2.5 or up    //
//   use ANDROID app version 3.7.1 or up    //
//////////////////////////////////////////////

/* RemoteXY select connection mode and include library */
#define REMOTEXY_MODE__ESP8266WIFIPOINT_LIB
#include <ESP8266WiFi.h>

#include <RemoteXY.h>

/* RemoteXY connection settings */
#define REMOTEXY_WIFI_SSID "RemoteXY"
#define REMOTEXY_WIFI_PASSWORD ""
#define REMOTEXY_SERVER_PORT 6377


/* RemoteXY configurate  */
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 2,0,21,0,6,5,0,1,0,68
  ,20,12,12,2,88,0,1,0,42,38
  ,12,12,2,88,0 };
   
/* this structure defines all the variables of your control interface */
struct {

    /* input variable */
  uint8_t button_2; /* =1 if button pressed, else =0 */
  uint8_t button_3; /* =1 if button pressed, else =0 */

    /* other variable */
  uint8_t connect_flag;  /* =1 if wire connected, else =0 */

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_BUTTON_2 D4
#define PIN_BUTTON_3 D3


void setup() 
{
  RemoteXY_Init (); 
   
  pinMode (PIN_BUTTON_2, OUTPUT);
  pinMode (PIN_BUTTON_3, OUTPUT);
   
  // TODO you setup code
   
}

void loop() 

  RemoteXY_Handler ();
   
  digitalWrite(PIN_BUTTON_2, (RemoteXY.button_2==0)?LOW:HIGH);
  digitalWrite(PIN_BUTTON_3, (RemoteXY.button_3==0)?LOW:HIGH);
   
  // TODO you loop code
  // use the RemoteXY structure for data transfer


}
Title: Re: Use RemoteXY for Android communication
Post by: ahmed13007@gmail.com on May 06, 2017, 10:48 pm
If I bought the remotexy pro in my phone can I share it with my tap and still pro?
Title: Re: Use RemoteXY for Android communication
Post by: Jpma2 on Dec 24, 2017, 03:38 pm
@shev
Hello....using a Nano with ESP01 as AP on cloud server to remote control a jacuzzi (few A and D I/O). Everything works fine for a time.... After 45 to 120 minutes, the communication between Nano and ESP fails. I think it.s the problem because :
- the Nano keeps running (have tags in the sketch to follow it on the terminal and it's ok)
- the ESP keeps registered on my router
- a watchdog is running and never fire a reset of the sketch
But if it's probably where the problem is situated I can't fix it want it's managed by Remote XY.
Have you specific instructions to trace the problem ? Or other suggestions to solve it ?
Tx
JeanPaul
Title: Re: Use RemoteXY for Android communication
Post by: JackJR on Feb 19, 2018, 05:36 am
Hi everyone
I have a basic question
Can you tell me if any function is available in remote XY that allows us to have a notification on android phone like ringing or vibration or anything else

I'm going to make an anti robbery system and I want a notification on my phone when there is a person in place.

Title: Re: Use RemoteXY for Android communication
Post by: Barito on Mar 06, 2018, 03:08 pm
Waiting for my Bluetooth module to arrive at the mailbox just to test this app.
There are still exciting applications out there then!
Title: Re: Use RemoteXY for Android communication
Post by: saddys on Mar 14, 2018, 07:55 pm
It is possibile to use input remotexy.button in an array?
Title: Re: Use RemoteXY for Android communication
Post by: RubenMaa on Jul 06, 2018, 09:15 pm
Hey so, Im new to connection between Arduino and Android, and I tried to connect My hc-05 to my android using RemoteXY, with the objective of "driving" a dc motor car, I have the l293d Shield connected directly to the Arduino and I connected the bluetooth module to 7 and 8 pins, (RX and TX) and I connected the VCC to 5V port and GND to GND Port.

When I try to connect to the bluetooth of hc-05 it says this: "socket connect error: read failed,socket might closed or timeout, read ret: -1", I tried to change somethings in my code and nothing worked. Besides that I searched for the problem and nothing appears, Can someone say what it is? And what I have to do? Pls need this for a project for school thank you.


My code:

#define REMOTEXY_MODE__SOFTWARESERIAL
#include <SoftwareSerial.h>

#include <RemoteXY.h>

// RemoteXY connection settings
#define REMOTEXY_SERIAL_RX 8
#define REMOTEXY_SERIAL_TX 7
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
{ 255, 4, 0, 0, 0, 82, 0, 8, 28, 2,
  5, 16, 65, 27, 30, 30, 30, 64, 30, 30,
  31, 25, 2, 2, 1, 3, 3, 23, 12, 2,
  3, 22, 11, 49, 25, 31, 31, 79, 78, 0,
  79, 70, 70, 0, 2, 1, 41, 18, 22, 5,
  21, 54, 22, 5, 2, 26, 16, 31, 82, 0,
  76, 0, 129, 0, 65, 1, 33, 4, 28, 6,
  32, 4, 24, 67, 111, 110, 116, 114, 111, 108,
  111, 32, 82, 101, 109, 111, 116, 111, 0
};

// this structure defines all the variables of your control interface
struct {

  // input variable
  int8_t joystick_1_x; // =-100..100 x-coordinate joystick position
  int8_t joystick_1_y; // =-100..100 y-coordinate joystick position
  uint8_t switch_1; // =1 if switch ON and =0 if OFF
  uint8_t switch_2; // =1 if switch ON and =0 if OFF

  // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////


#include <AFMotor.h>
AF_DCMotor rightMotor(3, MOTOR12_64KHZ);      //Declaração dos 4 motores DC
AF_DCMotor leftMotor(2, MOTOR12_64KHZ);
AF_DCMotor rightMotor1(4, MOTOR12_64KHZ);
AF_DCMotor leftMotor1(1, MOTOR12_64KHZ);


String readString;

void setup()
{
  RemoteXY_Init();


  Serial.begin(9600);
  rightMotor.setSpeed(170);
  leftMotor.setSpeed(170);
  rightMotor1.setSpeed(170);
  leftMotor1.setSpeed(170);

}

void loop()
{
  RemoteXY_Handler();

  while (Serial.available()) {
    delay(50);
    char c = Serial.read();
    readString += c;
  }
  if (readString.length() > 0) {
    Serial.println(readString);
    if (readString == "FORWARD") {
      rightMotor.run (FORWARD);
      leftMotor.run (BACKWARD);
      rightMotor.run(FORWARD);
      leftMotor1.run (FORWARD);
      delay(500);
    }
    if (readString == "BACKWARD") {
      rightMotor.run (BACKWARD);
      leftMotor.run (FORWARD);
      rightMotor1.run (BACKWARD);
      leftMotor1.run (BACKWARD);
      delay(500);
    }
    if (readString == "LEFT") {
      leftMotor.run(BACKWARD);
      rightMotor.run(FORWARD);
      leftMotor1.run(BACKWARD);
      rightMotor1.run(FORWARD);
      delay(500);
    }
    if (readString == "RIGHT") {
      leftMotor.run(BACKWARD);
      rightMotor.run(BACKWARD);
      leftMotor1.run(FORWARD);
      rightMotor1.run(BACKWARD);
      delay(500);
    }
    if (readString == "STOP") {
      leftMotor.run(RELEASE);      //Desliga os motores
      rightMotor.run(RELEASE);
      leftMotor1.run(RELEASE);
      rightMotor1.run(RELEASE);
      delay(500);
    }

    readString = "";
  }
}
Title: Re: Use RemoteXY for Android communication
Post by: ZAKARIATOUIL on Apr 22, 2019, 09:17 pm
hi bro Can you use remotxy server cloud with webhook to connect with google assistant
Title: Re: Use RemoteXY for Android communication
Post by: hellojoseph1 on May 19, 2019, 01:16 am
Hello Genius Shev,

Q1) can i run same ((same project )) on two DIFFERENT cell phones at same time?
example >> i create one single simple remotexy project to read home temperature and both me and my wife have access to it at same time?  >>>> i tried but 2nd device does not connect unlessi close 1st cell phone says"Device already used by another app" .. why not multi instances?

Q2) CAN ((1 PROJECT )) communicate with two MCU devices at same time?
example>> i build one remotexy project to read two temperature from two different rooms by two different arduino devices but both report at same remote xy? possible?

Q3) i am using Edit field as a password so i need it to either shown as **** or cleared after few second.. how can i clear it ""automatically"" without press on X mark ?

thank you creating this app Sir