Edhan
November 15, 2019, 2:49pm
1
I have a problem maybe you can help with.
When I send this ip in the image to be displayed on the server(my app LCD) I’m getting gibberish 1811982528 to be exact.
I’m aware of little endian and big endian but not sure if that’s the cause or if my ip is just interpreted as numbers.
have u any suggestions that can help me
Can you post the code that you use? This is not very much information to go on
Edhan
November 16, 2019, 12:22pm
3
Ip = Ethernet.localIP()
Blynk.virtualWrite(V4, Ip);
If I serial print or print to an LCD the ip is normal but when I send it to blynk app it is gibberish
Edhan
November 16, 2019, 12:59pm
4
Maybe try this:
Ip = Ethernet.localIP();
String stringIP = String(Ip);
Blynk.virtualWrite(V4, stringIP);
There is more on stringifying things here: https://www.arduino.cc/reference/en/language/variables/data-types/stringobject/
1 Like
try this:
String Ip = Ethernet.localIP().toString();
Blynk.virtualWrite(V4, Ip);
Edhan
November 16, 2019, 7:28pm
7
I tried this already without success
Have not tried it this way I will test it and get back to you thanks
1 Like
Edhan
November 16, 2019, 11:03pm
8
@DaleSchultz
@Lichtsignaal
@PeteKnight
String ip = String(Ethernet.localIP([0])+"."+String(Ethernet.localIP()[1])+"."+String(Ethernet.localIP()[2])+"."+String(Ethernet.localIP()[3]);
This was the best I could do and it works.
Everything else seemed impossible
2 Likes
Hmmm, a bit over the top, but if it works, it works! Thanks for sharing!
Edhan
November 17, 2019, 12:24pm
10
Yes I agree … I’m assuming the Ips are stored as integers , ill dump the String conversions on the Ips sections and see what happens later, otherwise there is no other way that I know to accomplish it
I’m not sure about that Integer, I think they defined the IP as a custom datatype. Not sure how that would work. Maybe @Dmytro can resolve this for us