I`m trying to read a weigh value from a scale with the code above and using the this library https://github.com/bogde/HX711
arduino = DeviceOpen["Arduino", "COM3"]
DeviceConfigure[arduino, "Upload" -> {"Libraries" ->
"C:\\Users\\adm\\Documents\\Arduino\\libraries\\HX711-master",
Initialization -> "HX711 scale(A1,A0);
void setupScale()
{
Serial.begin(38400);
scale.set_scale(146.f);
scale.tare();
}",
"Functions" -> <|
"Scale" ->
ArduinoCode[<|"ArgumentTypes" -> {}, "ReturnType" -> Real,
"Code" -> "
float medicao()
{
return scale.get_units(10);
}
"|>]|>}];
I know that Arduino code works because I tested in Arduino IDE before and works, but when I use in Mathematica an it just shows me the output below -[Infinity].
[
I wanna know what is causing this and how I fix it.