You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
String(negativeInteger, HEX) doesn't return the same thing than with an Arduino UNO.
Settings in IDE
Module: NodeMCU 1.0
Flash Size: 4MB/3MB
CPU Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu
Sketch
long a;
void setup() {
// put your setup code here, to run once:
a = -100;
delay(500);
Serial.begin(9600);
Serial.println(String(a,HEX));
}
void loop() {
// put your main code here, to run repeatedly:
}
Serial Output
-64
Exact same code, uploaded to UNO
ffffff9c
Strange, isn't it? I supposed String library was platform independant... I was wrong.