Pin configuration on UNO board.

I am into this project which needs me to use 3 Hall effect sensors, a 20x4 lcd display, and a micro sd card module. I was wondering if there is any way I could use them all on an UNO board, keeping in mind that it has very less number of digital pins available.
The 3 sensors use 1 pin each for digital output, the LCD uses 6 digital pins of UNO and micro SD module uses 4 of digital pins on arduino. Is there any way I could connect them all on a single UNO board?!! (Any way I could change the pin configuration so that some of the digital pins can be connected on other pins of board, or any pin of the sensor which can be used on other available pin)

Im using A1104 Hall effect sensor, standard 20x4 LCD display and

Get a backpack for the LCD. This will probably have an i2c interface which connects to pins A4 & A5 on Uno.
s-l225 (9).jpg
AdaFruit make a backpack which also has an SPI interface. This could share several pins with the SD card. But it's also more expensive.

Did you know that you can use the analog input pins as digital input or output pins?

s-l225 (9).jpg

This appears to be the OP's third Thread on the same project.

...R

Robin2:
This appears to be the OP's third Thread on the same project.

...R

Kindly don't reply if your reply is of no help to me (I am talking about the earlier reply as well). And be it 4 or 5 threads on the same project, I'll keep posting threads until unless my all issues are resolved and my project doesn't run smoothly. :slight_smile:

Brootus:
And be it 4 or 5 threads on the same project, I'll keep posting threads until unless my all issues are resolved and my project doesn't run smoothly. :slight_smile:

You will find the Forum much more useful if you help us to help you. One part of that is not fragmenting the information about the same project across separate Threads. Having all the information in one place allows us to have a good overview of the entire project.

You can click Report to Moderator and ask to have your Threads merged.

...R

Brootus:
I'll keep posting threads until unless my all issues are resolved

Well, take care with that. The forum moderators can sometimes come down hard on cross-posters. Robin2 is just trying to warn you.

Brootus:
Kindly don't reply if your reply is of no help to me (I am talking about the earlier reply as well).

Are you referring to my post about i2c backpacks? What was unhelpful about that?

Brootus, your attitude leaves something to be desired.

Anyway, you also can't count. 3 plus 6 plus 4 equals 13 and an Uno has more pins than that.

The sd needs specific pins, For the rest you're free to use other pins (including the analog ones).

PaulRB:
Get a backpack for the LCD. This will probably have an i2c interface which connects to pins A4 & A5 on Uno.
s-l225 (9).jpg
AdaFruit make a backpack which also has an SPI interface. This could share several pins with the SD card. But it's also more expensive.

"if you just saw there, I asked what could I do with the existing sensors and board. I nowhere mentioned buying other things because using a MEGA board would probably solve my problem (ikt).

PaulRB:
Did you know that you can use the analog input pins as digital input or output pins?

It would be kind o f you to help me out with the declarations that I would have to make in the program to do that.

PaulRB:
Well, take care with that. The forum moderators can sometimes come down hard on cross-posters. Robin2 is just trying to warn you.

Well you don't need to worry about that!

Okay now that I've worked out the Multiple interrupt problem and managing number of pins, I have another issue while printing this on the LCD. Though I've discussed above topics with regard to 3 sensors, I tried using 2 sensors and printing the output on Standard 16X2 LCD.
Here's the code I used to print the calculations obtained from 2 sensors on LCD.

lcd.clear();
lcd.setCursor(0,0);
lcd.print("RPM 1___");
lcd.print(     rpm1);
lcd.setCursor(0,1);
lcd.print("RPM 2___");
lcd.print(     rpm2);

here I have used External interrupt for RPM1 and pinchangeInterrupt for RPM2.
The problem is, when I run the program, The sensor 1 output is printed clearly while the second output( in the second line), keeps on blinking too fast so it becomes difficult to read it.
I tried putting both results in the same line with the code

lcd.clear();
lcd.setCursor(0,0);
lcd.print("1___");
lcd.print( rpm1);
lcd.setCursor(9,0);
lcd.print("2___");
lcd.print( rpm2);

Well, this just worsens the problem because now both the results keep blinking very fast.

Go on. You have deliberately cleared the screen. Of course it will blink.

Overwrite the previous contents. Add a trailing space to rub out any previous wider number. e.g. when you go from 10 to 9.

There is little point in printing the same number repeatedly. Only update if there is a change. Only update once or twice a second.

David.

Brootus:
"if you just saw there, I asked what could I do with the existing sensors and board. I nowhere mentioned buying other things because using a MEGA board would probably solve my problem (ikt).

But you asked about using an Uno. Using a Mega would not be using an Uno. And you did not mention not buying other things. Using a Mega would be "buying another thing". Unless you already had a Mega, but you did not say you had one. (Unless of course you mentioned that in one of your other threads, and that's the problem with cross-posting.)

To use an analog input A3 as a digital output, just write:

pinMode(A3, OUTPUT);
...
digitalWrite(A3, HIGH);