Hi everyone,
I'm using the color-sensor EMB018 in Flowcode 6.
I created almost the same programm as the example in the help page : http://www.matrixtsl.com/wiki/index.php ... s:_Sensors)
But I have a problem ; I have an issue of results at the step of "GetFrequency". If you watch the example programm, the RGB values are collected and disp on the LCD, but in mine the sensor isn't able to get the frequency of the red, blue and green after put the filter of each color.
I don't know if my issue is because of my connecting on the pins, or if the color objet has to be link with the sensor...
I join my programm if someone would kindly help me...
//First in the programm the switch in front of the purple led has to be activate. Then the issue is in the macro "TestViolet".
I'm sorry for the second post, now that i found where to create a new topic. I'm sorry for my english by the way
Thanks a lot.
BatmanSterling.
color sensor issue with "GetFrequency" Flowcode 6
Moderator: Benj
-
- Posts: 5
- Joined: Mon Dec 11, 2017 4:01 pm
- Been thanked: 1 time
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: color sensor issue with "GetFrequency" Flowcode 6
Hi,
It looks like the simulation is not working, we will check this out.
Do you have this working on hardware?
It looks like the simulation is not working, we will check this out.
Do you have this working on hardware?
-
- Posts: 5
- Joined: Mon Dec 11, 2017 4:01 pm
- Been thanked: 1 time
- Contact:
Re: color sensor issue with "GetFrequency" Flowcode 6
Hey,
Thanks for the answer
If I've well understood your answer, on my computer the simulation works, but at the step "getfrequency" which take the frequency of red, green and blue, the programme crashes and it is written : "Results Mistakes".
I joined a file with my programm.
Did I well answer your question ?
Thanks
Thanks for the answer
If I've well understood your answer, on my computer the simulation works, but at the step "getfrequency" which take the frequency of red, green and blue, the programme crashes and it is written : "Results Mistakes".
I joined a file with my programm.
Did I well answer your question ?
Thanks
- 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: color sensor issue with "GetFrequency" Flowcode 6
Hello,
I believe I have found the problem now. Please can you test the new component and check it solves the problem for you.
Simply copy the attached file to your "Flowcode 6/components" directory and restart Flowcode.
Let us know how you get on.
I believe I have found the problem now. Please can you test the new component and check it solves the problem for you.
Simply copy the attached file to your "Flowcode 6/components" directory and restart Flowcode.
Let us know how you get on.
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
-
- Posts: 5
- Joined: Mon Dec 11, 2017 4:01 pm
- Been thanked: 1 time
- Contact:
Re: color sensor issue with "GetFrequency" Flowcode 6
Hello,
Thanks a lot, it works perfectly now. I really thank you for your time and you answer !
But how did you know that it was the problem ?
Thanks again to all who replied me
Thanks a lot, it works perfectly now. I really thank you for your time and you answer !
But how did you know that it was the problem ?
Thanks again to all who replied me
- 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: color sensor issue with "GetFrequency" Flowcode 6
Thanks for the fast reply, much appreciated.
The problem was down to the order the components were added to the project.
The Flowcode panels are a tree like structure. For example.
Root (dashboard and 3D)
-Component1
--Comp1 Object1
--Comp1 Object2
-Component2
--Comp2 Object1
....
The component detects for collisions with other panel items and then scans for the component name to get a handle to reference the colour.
The collision was ok but when scanning for the component name it was missing the component because the scan was ending at the colour sensor.
e.g. this would work
Root (dashboard and 3D)
-Shape1
-ColourSensor
but this would fail.
Root (dashboard and 3D)
-ColourSensor
-Shape1
Now the scan covers all panel items.
The problem was down to the order the components were added to the project.
The Flowcode panels are a tree like structure. For example.
Root (dashboard and 3D)
-Component1
--Comp1 Object1
--Comp1 Object2
-Component2
--Comp2 Object1
....
The component detects for collisions with other panel items and then scans for the component name to get a handle to reference the colour.
The collision was ok but when scanning for the component name it was missing the component because the scan was ending at the colour sensor.
e.g. this would work
Root (dashboard and 3D)
-Shape1
-ColourSensor
but this would fail.
Root (dashboard and 3D)
-ColourSensor
-Shape1
Now the scan covers all panel items.
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
-
- Posts: 5
- Joined: Mon Dec 11, 2017 4:01 pm
- Been thanked: 1 time
- Contact: