Jump to content
43oh

MarcosA

Members
  • Content Count

    3
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by MarcosA

  1. Hello, everyone! Has anyone used the I2C display module with the TM4C123 Launchpad? I'm trying to use this code as a test, but I was not successful. The version of the library I am using is 1.2.1
    I accept other suggestions for using the i2c display. 

    Thanks in advance! 


    The code:

    #include <Wire.h>
    #include <LiquidCrystal_I2C.h>
    
    // Start the I2C address at 0x27 position
    LiquidCrystal_I2C lcd(0x27,2,1,0,4,5,6,7,3, POSITIVE);
     
    void setup()
    {
     lcd.begin (16,2);
    }
     
    void loop()
    {
      lcd.setCursor(0,0);
      lcd.print("test line 1");
      lcd.setCursor(1,1);
      lcd.print("test line 2");
    }

    The error: 

    In file included from C:\Users\Marcos\Documents\Energia\libraries\LiquidCrystal\FastIO.cpp:32:0:

    C:\Users\Marcos\Documents\Energia\libraries\LiquidCrystal\FastIO.h:38:52: fatal error: pins_arduino.h: No such file or directory

     #include <pins_arduino.h> // pleasing sanguino core

                                                        ^

    compilation terminated.

    exit status 1

     

     

  2. Hello everyone! I am using the SIM800L module to send SMS through a TivaC TM4C123GXL board, but its clock is 80MHz, and the library only accepts 20, 16 or 8 MHz. In Arduino it worked perfectly, this code found on a website. How do I reduce the TM4C123 clock in Power software? Is there another solution? Thanks in advance!
     

    The code:

    #include <SoftwareSerial.h>
    SoftwareSerial sim(3, 4);
    int _timeout;
    String _buffer;
    String number = ""; //here I inserted my number phone
    void setup() {
      delay(4000); //delay for 7 seconds to make sure the modules get the signal
      Serial.begin(9600);
      _buffer.reserve(50);
      Serial.println("Sistem Started...");
      sim.begin(9600);
      delay(1000);
    }
    void loop() {
      SendMessage();
      delay(10000);
    }
    void SendMessage()
    {
      //Serial.println ("Sending Message");
      sim.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
      delay(1000);
      //Serial.println ("Set SMS Number");
      sim.println("AT+CMGS=\"" + number + "\"\r"); //Mobile phone number to send message
      delay(1000);
      String SMS = "Testing GSM module";
      sim.println(SMS);
      delay(100);
      sim.println((char)26);// ASCII code of CTRL+Z
      delay(1000);
      _buffer = _readSerial();
    }
    String _readSerial() {
      _timeout = 0;
      while  (!sim.available() && _timeout < 12000  )
      {
        delay(13);
        _timeout++;
      }
      if (sim.available()) {
        return sim.readString();
      }
    }

    The error: 

     #error This version of SoftwareSerial supports only 20, 16 and 8MHz processors 

×
×
  • Create New...