Converting 4 bytes to integer

... the number is sent as-is, not combined with the URL as before?

the idea is that the number is to be sent , after it gets transformed from a string to a number.
as we tried here

So its like saying Arduino reads integer 1234 then converts it to "1234" and sends it to the app , the app receives "1234" converts it back to 1234 and sends it to Thingspeak

Which will be a string without the quote marks, produced as I described before.

Yes i dont want that , its like fooling myself , i want to use a mehod same like Integer.parseInt(string here)

You are not making any sense :upside_down_face:

  1. The Url is a string.
  2. I have told you how to remove quotes so that you have a string representing the number. I have also shown how to create an int from a string, but that is not what is needed here, you need a string that will be joined to the API Key String and the Field String.

and whats the use of :stuck_out_tongue:image

with this blocks , when i run the App my Thingspeak field is getting refreshed but without a single value , probably cuz it doesnt read a number.

image
so what i understood is that i connect to my channel , i just pass a string value not an ACtual number

Are you sure the syntax for Thingspeak is 100% correct?

From https://uk.mathworks.com/help/thingspeak/writedata.html

POST https://api.thingspeak.com/update
api_key=XXXXXXXXXXXXXXXX
field1=73

Looks like a syntax thing.

Try this, verbatim.

according to the documentation snippet provided by @ChrisWard , the Post method should be used...

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

There is a further documentation snippet that uses GET. The OP omitted a large portion of the syntax.

Write data with GET
https://uk.mathworks.com/help/thingspeak/writedata.html

example:
https://api.thingspeak.com/update.json?api_key=<write_api_key>&field1=123

I used @ChrisWard format with Get and didnt worked , i tried with of different methods , even with MQTT extensions for app inventor.

I got it going with the same block , but now used replace all text like Chris provided
image .

Now TS channel is being updated but again 0 valuesimage .

Does replace all text works as Integer.ParseInt(string here) or is it just removing the " " ??
Because if its the latter , thats why i dont get a value on TS.

P.S Actually i read the Help on replace all so , we get another String just without " " . Thats why i get 0 readings , this value somehow must be parsedtoInt.

P.S 2: if there is no way to convert a string to an actualy number , then there is a chance that we can convert this string to Json and send it over ,but it will be last resort

Hello again

You have not created the 'StringsReceived' Block exactly as I have shown, which exactly matches the example by mathworks. Please do that, run the App and screenshot the entire Block with DoIt applied.

Hello Chris
using this

Doesnt upload Anything. Doesnt even connect actually

my Block followed an example from here : ESP32. MQTT. Broker. Publish. Subscribe. ThingSpeak

And it uploads to server like that , it just uploads 0 values

Your StringsReceived Block is not quite right - 'Thingspeak_List' is intiatised as a List, which changes the "decoration" of the value. notice that I replaced it with 'StringIntReceived' initialized as text.

indeed u are right but still doesnt connects to server .

Segment to text just removes " " so it still a string . Its like fooling myself .
it doesnt convert the string to an actual number .
I read a method to do that is base 10 convert to bin in the math section but i am getting errors for number 0.

The value is assembled as part of the URL. Therefore, the value must be represented by a string. You can change the string to an int, but the moment you concatenate it into a URL, it becomes a string.