1

Topic: Can i display a float like this in remoteXY?

I put a simple sketch together to illustrate what I'm saying.

http://remotexy.com/en/editor/779e2a541 … 9cbc181cc/

i want to divide the top 2 fields and display the result in the bottom field.

Can this be done in remoteXY?

thanks everyone

2

Re: Can i display a float like this in remoteXY?

Change the top 2 edit boxes to data-type "Float", and the bottom edit field to a "Text String" Indication.

The values you put in the top two boxes will go into floating point data in your sketch.

Divide them as you want, and then convert the result to a string to display in the bottom box.

Note : You cannot use an "Edit" box to display anything coming FROM your controller, the interface is not bidirectional. Edit fields are mobile device data TO your controller data.

IMHO this is a poor interface, you have no clue that what you have entered into an Edit field has actually arrived at the controller

2B, or not 2B, that is the pencil ...

3

Re: Can i display a float like this in remoteXY?

Thank you for the info, i was trying to display the result into another float and that doesn't work. I'll see how far I make it with yourinfo.

thanks

ps; that is not the interface i'm using. It was just to make clear that i was using 3 input fields. My interface is 3 floats at the moment.

4

Re: Can i display a float like this in remoteXY?

bjr wrote:

..... It was just to make clear that i was using 3 input fields. My interface is 3 floats at the moment.

That's the problem, they are input fields only, data direction is one-way, so the input field never shows any values that are in the controller, except at "Registration" when the app reads the data from the controller.  After that you can change any input field's data in the controller, and it won't show on the app.

2B, or not 2B, that is the pencil ...

5

Re: Can i display a float like this in remoteXY?

Sorry I have no knowledge about this stuff, just trying to learn.

So, I cant display the result or i can? you have me confused.
I was going to pay someone to write the code, but if it cant be done it would be good to know before i get scammed by someone who said they can do it.

thanks again

6

Re: Can i display a float like this in remoteXY?

bjr wrote:

Sorry I have no knowledge about this stuff, just trying to learn.

So, I cant display the result or i can? you have me confused.
I was going to pay someone to write the code, but if it cant be done it would be good to know before i get scammed by someone who said they can do it.

thanks again

Sorry to confuse you....

Let me put it simple....

An "Edit field" allows you to send data into the controller - you will not see any changes that the controller may make to that data until you restart the app, so you cannot use en "Edit field" to display data coming from the controller.

There isn't a display field that can display numbers, there is only a "Text String" display, so the result of your multiplication would have to be converted (in your Arduino, or whatever, code) into a String (of characters) data-type, and displayed on your app as a "Text String".

What you want is perfectly possible, but it highlights a limitation iimposed by the controls available, and their capabilities.

2B, or not 2B, that is the pencil ...

7 (edited by Daba 2018-09-24 22:55:47)

Re: Can i display a float like this in remoteXY?

I got it working, it is clunky, and not nice, but it works....

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

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

#include <RemoteXY.h>

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


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,8,0,11,0,50,0,8,13,0,
  7,44,11,9,20,5,2,26,2,2,
  7,44,38,9,20,5,2,26,2,2,
  129,0,33,9,3,6,8,120,0,129,
  0,60,9,3,6,8,61,0,67,4,
  67,9,20,5,2,26,11 };
  
// this structure defines all the variables of your control interface 
struct {

    // input variable
  float edit_1;
  float edit_2;

    // output variable
  char text_1[11];  // string UTF8 end zero 

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

} RemoteXY;
#pragma pack(pop)

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



void setup() {
  // put your setup code here, to run once:

  RemoteXY_Init (); 
}

void loop() {
  // put your main code here, to run repeatedly:

  RemoteXY_Handler (); 

  float Result = RemoteXY.edit_1 * RemoteXY.edit_2;
  String temp = String(Result, 4);
  temp.toCharArray(RemoteXY.text_1, 11);
  
}

... and the RemoteXY app is here....

http://remotexy.com/en/editor/497517db0 … c15e026da/

enjoy !!


EDIT : I did it as multiply, not divide, modify to suit

2B, or not 2B, that is the pencil ...

8

Re: Can i display a float like this in remoteXY?

I gave that a try, nothing appears in the "solution" field. ? Probably something I did, dunno.

thanks for your help

9

Re: Can i display a float like this in remoteXY?

bjr wrote:

I gave that a try, nothing appears in the "solution" field. ? Probably something I did, dunno.

thanks for your help


Post your sketch, you must have missed something....

paste it between the code markers ( <> on the menu above the message compose box)

2B, or not 2B, that is the pencil ...

10

Re: Can i display a float like this in remoteXY?

I got it, i had to use a text field with dtostrf. works great thanks.

11 (edited by gauriwarma 2019-04-10 09:18:12)

Re: Can i display a float like this in remoteXY?

I am web developer, I am searching this info since long time Thanks for sharing.