IRSensor & LineSensor

For Formula AllCode users to discuss projects, programs, and any other issues related to the Formula AllCode robotics platform.

Moderators: Benj, Mods

sundgau
Posts: 56
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 9 times
Contact:

IRSensor & LineSensor

Postby sundgau » Sun Nov 24, 2019 2:28 pm

Hi Benj,
I have two problems with you regarding line and distance sensors.
The first concerns the return variable of the functions "CheckIR" and "CheckLine" which is in byte:
MX_UINT8 FCD_0dcd1_FormulaAllCode1__CheckIR (MX_UINT8 FCL_SENSOR)
while the return variable of "ReadIRSensor" is in full: MX_UINT16 LCD_0dcd1_FormulaAllCode1__ReadIRSensor (MX_UINT8 FCL_CHANNEL)
During operation there are several state changes depending on the distance!
Same for "ReadLine" and "CheckLineSensor".

During operation there are several state changes depending on the distance!

Another problem now that concerns the simulation; the function "CheckIR" is not simulated unlike the "CheckLine function that works well (and that simulates the first problem).

Thank you in advance for having the time to work on these problems for a V7 flowcode solution!
Bruno
IR-Line_Sensor_Test.fcfx
(15.86 KiB) Downloaded 4 times

User avatar
Benj
Matrix Staff
Posts: 14363
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4444 times
Been thanked: 4144 times
Contact:

Re: IRSensor & LineSensor

Postby Benj » Mon Nov 25, 2019 11:32 am

Thanks for letting us know. It looks like the bug is present in v7 and v8 so I'll get them both fixed.

Please find attached an updated version of the v7 component. Simly copy the file into your "Flowcode 7\components" folder and restart Flowcode.
FormulaAllCodeP4.fcpx
(335.66 KiB) Downloaded 16 times
These users thanked the author Benj for the post:
sundgau (Mon Nov 25, 2019 2:32 pm)
Rating: 5.26%
 

sundgau
Posts: 56
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 9 times
Contact:

Re: IRSensor & LineSensor

Postby sundgau » Mon Nov 25, 2019 7:09 pm

Sorry but the leds do not work properly anymore ...
Bruno
Attachments
Screen Shot 11-25-19 at 07.08 PM.PNG
Screen Shot 11-25-19 at 07.08 PM.PNG (6.18 KiB) Viewed 166 times

User avatar
Benj
Matrix Staff
Posts: 14363
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4444 times
Been thanked: 4144 times
Contact:

Re: IRSensor & LineSensor

Postby Benj » Tue Nov 26, 2019 2:51 pm

Aha thanks for letting us know, hopefully all fixed now.

FormulaAllCodeP4.fcpx
(335.64 KiB) Downloaded 14 times

sundgau
Posts: 56
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 9 times
Contact:

Re: IRSensor & LineSensor

Postby sundgau » Wed Nov 27, 2019 8:52 am

Hello,
Everything seems to work perfectly. Thanks again
Bruno
These users thanked the author sundgau for the post:
Benj (Wed Nov 27, 2019 10:34 am)
Rating: 5.26%