I am trying to send a value that is filtered by the arduino in real time to the roboteq controller for some feedback control using the Scripting. I have the Roboteq Controller connected by RS232 with a SBL1360 to the Arduino.
In my first stab, I wrote the code like this.
void setup() {
Serial.begin(115200);
}
void loop() {
ForceReading = analogread(SensorLocation);
FilterForceReading = Filter(ForceReading);
Serial.print("!VAR 1 FilterForceReading");
}
However, it would only read zero when I try to run via the Roborun Utility using the following:
dim Force as integer
"Inside a while loop"
Force = getvalue(_VAR, 1)
Print(Force, "\n")
The ForceReading value does change in realtime, when tested separately.
Is there a syntax error from what I am doing? Is it even possible?