So I am making a human sized robotic arm and was wondering whether or not you all think that,( since the pins on an arduino uno r3 will not be enough), getting a mega arduino or using a shift register would be a better investement of my time and money>
Show us what you're planning to do, so we can actually assess whether you're using the existing I/O as economically as you could, and we'll start from there.
it is enough pins for creating an Arduino Uno board.
I have two UNOs running with about 130 inputs and pins left over. There are many ways to accomplish this, your implementation is dependent on what you design and plan on accomplishing. When you tell us this also note any critical timing as this will have a big impact on what parts are chosen.
@luke16
None of the above.
More inputs or more outputs?
there are lot of ways to do that.
Multiplexing,
Charlyplexing,
all sorts of IC/Boards like
port expanders like PCF8574, MCP23017, MCP23S17, ...
but also dedicated LED drivers like MAX7219, HT16K33, SX1509,...
PWM servo drivers like PCA9685.
shift registers are possible, but are my last choice.
It all depends about what you really need and what's available already in your project.
If you describe your project in more detail we might find an easy solution.
These are my go to chips whenever I want more I/O. They have a single pin called an "interrupt" pin, but you don't have to use interrupts to use them. I just pole (regularly read) the single pin and it tells me if any of the inputs has changed. If it has then, there is a register inside the chip that tells you what pin this is, so you can then read it.
The data sheet for this device (the two chips are covered in one datasheet) can be a bit daunting. If you want to wimp out there are Arduino libraries to help you. Adafruit do provide one, but there are others.
Go with the mega. Once you get more I/O, you tend to need more processing to handle them and that means more memory. Mega2560 has lots of both.
thanks man, will do