EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / LCD 12C 16X2 LCM1602 IIC V1 Interface problems with arduino

LCD 12C 16X2 LCM1602 IIC V1 Interface problems with arduino

|

Microcontroller › Arduino › LCD 12C 16X2 LCM1602 IIC V1 Interface problems with arduino

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 4 months ago by Vara Ashishkumar.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 9, 2016 at 1:42 am #4208
    osama
    Participant

    hello guys 

    i'm working on sms based control electrical dvices using gsm sim900 project, when i include the ( lcd.begin (16,2)) the hole system stop

    and i got nothing on serial monitor, so any one can help me on this and i'll i will appreciate that, here you are the skech

    #include <SoftwareSerial.h>
    #include <LiquidCrystal_I2C.h>
    #include <Wire.h>
    SoftwareSerial SIM900(7, 8);
    char incoming_char=0;
    LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
    void setup()
    {
      Serial.begin(19200); // for serial monitor
      SIM900.begin(19200); // for GSM shield
      SIM900power();  // turn on shield
      delay(25000);  // give time to log on to network.
      pinMode(10, OUTPUT);
       pinMode(11, OUTPUT);
        pinMode(12, OUTPUT);
     pinMode(13, OUTPUT);
      digitalWrite(10, LOW);
      digitalWrite(11, LOW);
      digitalWrite(12, LOW);
      digitalWrite(13, LOW);
       SIM900.print("AT+CMGF=1r");  // set SMS mode to text
      delay(1000);
      SIM900.print("AT+CNMI=2,2,0,0,0r"); 
       delay(1000);
    }
    void SIM900power()
    // software equivalent of pressing the GSM shield "power" button
    {
      digitalWrite(9, HIGH);
      delay(1000);
      digitalWrite(9, LOW);
      delay(7000);
    }
    void loop()
    {
      // Now we simply display any text that the GSM shield sends out on the serial monitor
      if(SIM900.available() >0)
      {
        incoming_char=SIM900.read(); //Get the character from the cellular serial port.
        Serial.print(incoming_char); //Print the incoming character to the terminal.
        if (incoming_char=='a')
        {
          digitalWrite(10,HIGH);
           Serial.println(incoming_char);
          SIM900.println("AT+CMGD=1,4"); // delete all SMS
     
           }
           if (incoming_char=='b')
        {
          digitalWrite(11,HIGH);
           Serial.println(incoming_char);
          SIM900.println("AT+CMGD=1,4"); // delete all SMS
     
           }
            if (incoming_char=='c')
        {
          digitalWrite(12,HIGH);
           Serial.println(incoming_char);
          SIM900.println("AT+CMGD=1,4"); // delete all SMS
     
           }
          
            if (incoming_char=='d')
        {
          digitalWrite(13,HIGH);
           Serial.println(incoming_char);
          SIM900.println("AT+CMGD=1,4"); // delete all SMS
     
           }
            if (incoming_char=='e')
        {
          digitalWrite(10,LOW);
           Serial.println(incoming_char);
          SIM900.println("AT+CMGD=1,4"); // delete all SMS
     
           }
            if (incoming_char=='f')
        {
          digitalWrite(11, LOW);
           Serial.println(incoming_char);
          SIM900.println("AT+CMGD=1,4"); // delete all SMS
     
           }
      }
    }
     
    thank you all
     
     

     

    January 12, 2016 at 12:56 pm #13629
    Vara Ashishkumar
    Participant

    Hye osama,

    You declared same pin (Pin No: 7 ) for software serial's RX pin and LCD's D7 pin. So it was happended.

    Change any one of the pin from software serial pin or lcd pin.

    Correct once and run it. It should be work.

     

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • LED circuit for 1/6 scale diorama May 14, 2025
  • Electronic board faulty?!? May 13, 2025
  • Can I use this charger in every country? May 13, 2025
  • using a RTC in SF basic May 13, 2025
  • An Update On Tarrifs May 13, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise