Go Down

Topic: Rotary Switch Colour Selector help needed (Read 1 time) previous topic - next topic

Kobra299



A switch like that needs an awful lot of Arduino pins to connect it (12 of them).

If pins are important you'd be much better off with a "rotary encoder". This will do the same thing but only needs two pins for the shaft rotation. You also get a built-in push button (push the shaft down) which you can connect to a third pin.


thank you that is what I need I was not sure now I known just got to work out how to do the data from that to it now

pekkaa


A switch like that needs an awful lot of Arduino pins to connect it (12 of them).


He only needs to connect 7 pins. He can leave the rest of the pins disconnected.


If pins are important you'd be much better off with a "rotary encoder". This will do the same thing but only needs two pins for the shaft rotation. You also get a built-in push button (push the shaft down) which you can connect to a third pin.


I believe it is a bit more complicated to read gray code/ rotary encoder. But perhaps there are Arduino libraries for that, though.

Far-seeker


I believe it is a bit more complicated to read gray code/ rotary encoder. But perhaps there are Arduino libraries for that, though.


Yes, there is a whole section of the Playground with different examples of how to use rotary encoders with Arduinos.

pekkaa



I believe it is a bit more complicated to read gray code/ rotary encoder. But perhaps there are Arduino libraries for that, though.

Yes, there is a whole section of the Playground with different examples of how to use rotary encoders with Arduinos.


Yes, but it would still be more complicated than using a rotary switch with each pin connected a different input pin. If this is Kobra299's fist Arduino project, I suggest going with the simpler alternative.

fungus


Yes, but it would still be more complicated than using a rotary switch with each pin connected a different input pin. If this is Kobra299's fist Arduino project, I suggest going with the simpler alternative.


I don't think a rotary switch is as easy as you think... it would need quite a lot of code and I bet there's no library for it.

A rotary encoder library with examples is probably easier for a novice to get working.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Go Up