Formula Allcode using VS C#
Posted: Thu Feb 03, 2022 3:06 pm
Hi hope you can help with this.
I'm using C# in Visual studios 2019 with my Formula AllCode. I am trying to code it so it uses the IR sensors to navigate environment.
I've set up 2 variables 1 for outgoing ports used for movement commands and a 2nd for the incomming port to get feedback from the sensors. I have double checked that the ports have been correctly assigned but i am getting no feedback from any of the IR Sensors
This is the code i am using:
char incomingPortNumber = (char)8;
FA_DLL.FA_ComOpen(incomingPortNumber);
uint ir = FA_DLL.FA_ReadIR(incomingPortNumber, (char)1);
The output for the sensors is always 0 regardless of objects are in the way or not.
I am using using V3 but I have read this similar issue may have been resolved in a later version, is this true?
Thanks,
Adam
I'm using C# in Visual studios 2019 with my Formula AllCode. I am trying to code it so it uses the IR sensors to navigate environment.
I've set up 2 variables 1 for outgoing ports used for movement commands and a 2nd for the incomming port to get feedback from the sensors. I have double checked that the ports have been correctly assigned but i am getting no feedback from any of the IR Sensors
This is the code i am using:
char incomingPortNumber = (char)8;
FA_DLL.FA_ComOpen(incomingPortNumber);
uint ir = FA_DLL.FA_ReadIR(incomingPortNumber, (char)1);
The output for the sensors is always 0 regardless of objects are in the way or not.
I am using using V3 but I have read this similar issue may have been resolved in a later version, is this true?
Thanks,
Adam