Replacing arduino mini pro with arduino uno

I have a arduino uno but my project has specifications for arduino pro mini. Circuit description is given in the link

will uno work fine?

The only thing that I see is that you might have to use software serial for the GSM module so that you can use the hardware serial for programming and trouble shooting the Uno code.

I'm a beginner so please explain what you meant by "software serial for the GSM module " :stuck_out_tongue:
Posting the code below:
#include <LiquidCrystal.h>
#define pulse 13
int i,Pulse;
float one_pulse=0.3125;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
pinMode(pulse, INPUT);
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Energy Meter ");
lcd.setCursor(0,1);
lcd.print("Interfacing with");
delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print(" Arduino By ");
lcd.setCursor(0,1);
lcd.print(" Saddam Khan ");
delay(2000);
}
void loop()
{
int Pulse=0;
float Rupee=0,Unit=0;
lcd.clear();
while(1)
{
if(digitalRead(pulse))
{
i++;
Pulse++;
Unit=one_pulsei/1000;
Rupee=Unit
7;
while(digitalRead(pulse));
}
if(Pulse==3) // sending Msg after every 3 pulse
{
Serial.println("AT+CMGF=1");
delay(10);
Serial.println("AT+CMGS="9779185404"");
Serial.println();
Serial.println("Unit: ");
Serial.println(Unit);
Serial.println("Rupee: ");
Serial.println(Rupee);
Serial.write(26);
Pulse=0;
}
lcd.setCursor(0,0);
lcd.print("Rupee: ");
lcd.print(Rupee);
lcd.setCursor(0,1);
lcd.print("Unit: ");
lcd.print(Unit);
delay(10);
}
}

You program the Uno through USB which is connected to the hardware serial pins 0 (RX) and 1 (TX). If the GSM module is connected to TX it will see the programming signals from USB. I don't know if that would cause a problem or not, but it could cause trouble. The solution is to set up another serial port just for the GSM module using the software serial library. By the way, I don't see a Serial.begin(baud_rate) in your setup(). Serial.begin() must be there to initialize the hardware serial so it will output with Serial.print().

which serial port do you suggest I use.
About the baud rate, so far the program works fine without it. Is it a compulsion?

montyroxx:
which serial port do you suggest I use.

You need to do a little studying.

...R

UNO should work. You need a resistor (150 ohm) between LCD pin 15 and 5V.

liudr:
You need a resistor (150 ohm) between LCD pin 15 and 5V.

Why?

Paul__B:

liudr:
You need a resistor (150 ohm) between LCD pin 15 and 5V.

Why?

Many LCDs don't have current-limiting resistors with back light LEDs. Assuming the LED drops 3V voltage, the 150ohm resistor limits current to 13mA, more than enough to make the LCD readable in complete darkness.

I was objecting to the term "need". Very few of the "1602" displays (and particularly those readily available on eBay, Deal eXtreme, Newfrog etc.) do not contain a current limiting resistor. Where as a matter of interest, have you found ones that do not?

The correct version would be:

If neither resistor R8 or R9 on the LCD board is marked as "101" which is 100 ohms, you will need a resistor (150 ohm) between LCD pin 15 and 5V.