Color sensor

Community-Firmware (cfw), Selbstbaucontroller (TX-Pi, ftduino, usw.), usw.
Forumsregeln
Bitte beachte die Forumsregeln!
Antworten
Floris
Beiträge: 2
Registriert: 11 Sep 2020, 15:37

Color sensor

Beitrag von Floris » 11 Sep 2020, 16:11

Hi, i am using the colr sensor with the Ft duino. I have made a simple program to read the values from the sensor. I use the three known disks; white, blue, red. Even if I put them right on the sensor, the values I get are not similar; the vary to much to be of any use.
So, my question is:
- is this is a common 'problem' (in other words the color sensor is not much of a color sensor)
- or, do I not use the right input variables ( i use VOLTAGE)

Here is a part of the scetch. This one gives almost random values every time.

ftduino.input_set_mode(Ftduino::I8, Ftduino::VOLTAGE); // colorsensor
........
......
......
color = ftduino.input_get(Ftduino::I8);
Serial.println(color);
delay(2000);

Jan3D
Beiträge: 64
Registriert: 07 Nov 2019, 13:33

Re: Color sensor

Beitrag von Jan3D » 11 Sep 2020, 23:09

Hi Floris,

and welcome to the board.

As the "Tipps & Tricks" subforum is meant for giving and sharing of tips, I moved your question to the community projects forum, as your problem seems to be ftDuino-specific.

Dt.: in passenderes Forum verschoben.

Jan
Moderator in den Foren "Tipps und Tricks" und "3D Druck"

Benutzeravatar
EstherM
Beiträge: 1472
Registriert: 11 Dez 2011, 21:24

Re: Color sensor

Beitrag von EstherM » 12 Sep 2020, 16:53

Dear Floris,
you might want to search in this forum for "Farbsensor" and do an automatic translate for some of the results.
Floris hat geschrieben:
11 Sep 2020, 16:11
- is this is a common 'problem' (in other words the color sensor is not much of a color sensor)
Yes! The color sensor is more or less a sensor for the brightness. Therefore, the value depends on the amount of the incoming light and less on the color of the object. Nevertheless, it can be useful in certain situations.

DE: Der Farbsensor miss im Wesentlichen Helligkeit und weniger die Farbe des Objektes.

Cheers
Esther

Antworten