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
Formula Allcode using VS C#
-
- Posts: 1
- Joined: Thu Feb 03, 2022 2:37 pm
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Formula Allcode using VS C#
Hi Adam,
The terms incoming and outgoing are misleading and not really applicable.
The incoming port I beleive is for talking to the Bluetooth module directly using AT commands, you shouldn't ever need to use it.
You should do all AllCode commands via the Outgoing port and this will allow all the AllCode API commands to function.
The terms incoming and outgoing are misleading and not really applicable.
The incoming port I beleive is for talking to the Bluetooth module directly using AT commands, you shouldn't ever need to use it.
You should do all AllCode commands via the Outgoing port and this will allow all the AllCode API commands to function.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel