Tcs34725 Color sensor sample.
-
- Posts: 44
- http://meble-kuchenne.info.pl
- Joined: Sun Mar 21, 2021 2:13 pm
- Has thanked: 18 times
- Been thanked: 1 time
Tcs34725 Color sensor sample.
Hello everyone. Is there an example for using the Tcs34725 Color sensor?
-
- Matrix Staff
- Posts: 2086
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 644 times
- Been thanked: 702 times
Re: Tcs34725 Color sensor sample.
Hello.
These forums are for Flowcode v9 and v10
Can you please edit your post and select the v9 or v10 post icon? Is your Tcs34725 the Grove colour sensor or just a breakout board?
What target device are you using e.g just a microcontroller like 16F18877 or a BL011 or BL0055?
How are you wanting to view the results e.g LCD(type?), gLCD (type?) or UART?
As there are no examples, we require the above information to create one for you.
These forums are for Flowcode v9 and v10
Can you please edit your post and select the v9 or v10 post icon? Is your Tcs34725 the Grove colour sensor or just a breakout board?
What target device are you using e.g just a microcontroller like 16F18877 or a BL011 or BL0055?
How are you wanting to view the results e.g LCD(type?), gLCD (type?) or UART?
As there are no examples, we require the above information to create one for you.
Martin
Re: Tcs34725 Color sensor sample.
Thank you for your answer.
Flowcode V10
Arduino uno dip r3
TCS34725 sensor
RGB common anode led
EDIT: I have attached the example I made. But it didn't work
Flowcode V10
Arduino uno dip r3
TCS34725 sensor
RGB common anode led
EDIT: I have attached the example I made. But it didn't work
- Attachments
-
- RENK-1.fcfx
- (13.82 KiB) Downloaded 461 times
-
- Matrix Staff
- Posts: 2086
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 644 times
- Been thanked: 702 times
Re: Tcs34725 Color sensor sample.
Hello.
The attached project will only simulate if you use that attached updated component.
To do that before the updates are pushed.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
Replace the existing files with the attached Grove_I2C_Color_Sensor.fcpx file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten.
The Original component won't stop the hardware from working.
The simulation works by adjusting the RGB controls on the 2D panel.
The Red, Green & Blue text will change colour depending on the settings. The data and clock pins are chosen to work with Eblocks2 Grove board BL0129 and the Grove I2C colour sensor PCB.
If you don't have them then you will need to change pins accordingly.
You will need to take in to account that the sensor can output a 16bit value, if bright enough.
The RGB led only takes an 8 bit value.
Therefore you may need to play around with the sensor gain to make it work better.
The attached project will only simulate if you use that attached updated component.
To do that before the updates are pushed.
Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.
Code: Select all
C:\ProgramData\MatrixTSL\FlowcodeV10\Components
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten.
The Original component won't stop the hardware from working.
The simulation works by adjusting the RGB controls on the 2D panel.
The Red, Green & Blue text will change colour depending on the settings. The data and clock pins are chosen to work with Eblocks2 Grove board BL0129 and the Grove I2C colour sensor PCB.
If you don't have them then you will need to change pins accordingly.
You will need to take in to account that the sensor can output a 16bit value, if bright enough.
The RGB led only takes an 8 bit value.
Therefore you may need to play around with the sensor gain to make it work better.
- Attachments
-
- TCS34725FN-Uno-RGB.fcfx
- (34.5 KiB) Downloaded 449 times
-
- Grove_I2C_Color_Sensor.fcpx
- (83.73 KiB) Downloaded 478 times
Martin
Re: Tcs34725 Color sensor sample.
Unfortunately it didn't work. I uploaded the program you sent to the arduino, but I could not get color from the rgb led. Then I saw some problems that caught my attention, I changed them but it still didn't work.
1-SDA-SCL terminals are connected in reverse I guess
2-RGB leds are not connected to pwm terminals. I connected the RGB led to pins R-3, G-5, B-6.
I changed the pins in the program.
The program works fine now
1-SDA-SCL terminals are connected in reverse I guess
2-RGB leds are not connected to pwm terminals. I connected the RGB led to pins R-3, G-5, B-6.
I changed the pins in the program.
The program works fine now
-
- Matrix Staff
- Posts: 2086
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 644 times
- Been thanked: 702 times
Re: Tcs34725 Color sensor sample.
Indeed, I did state
If you post your working .fcfx project I can then see if I can improve it.
I'm glad its working for you.
Thanks for letting us know
What I should have done is matched the RGB LED pins, sorry about that.
If you post your working .fcfx project I can then see if I can improve it.
I'm glad its working for you.
Thanks for letting us know
Martin