1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Micro controller Programming

Discussion in 'Microcontrollers' started by M. Tamilarasan, Nov 6, 2013.

  1. M. Tamilarasan

    M. Tamilarasan Member

    Joined:
    Nov 6, 2013
    Messages:
    53
    Likes:
    0
    If we give Serial data input =GETID it sholud save as String in SD card, then if we give second input it should print in 2nd line SD card as String.once every string Print in SD card then new line should print
     
  2. M. Tamilarasan

    M. Tamilarasan Member

    Joined:
    Nov 6, 2013
    Messages:
    53
    Likes:
    0
    void setup()
    {
    Serial.println(ddd("EDF"));
    }
    void loop ()
    {
    getcommand();
    }
    void getcommand()
    {
    if(inputdata==SET99FMTCRD#)
    {
    if(FMTCRD)
    {
    Serial.print("FMT done");
    }
    else {
    Serial.print("FMT Failed");
    }
    }
    String ddd(String ff)
    {
    String adddata;
    adddata= " Getdata";
    ff+= adddata;
    return ff;
    }
    bool FMTCRD()
    {
    for (j=0;j<=15;j++)
    {
    Serial.println(ddd("ASDFRTG"));
    }
    return true;
    }


    The output i'm getting is:
    when the serial begins it prints : EDF Getdata

    when we give serial input " SET99FMTCRD#
    it prints FMT done and 15 new lines only...it unable to print the string which we passed to function ddd called inside the function FMTCRD...
    please anybody help me to solve this issue.

    The output is :
    EDFKarthik

















    FMT Done
     
  3. M. Tamilarasan

    M. Tamilarasan Member

    Joined:
    Nov 6, 2013
    Messages:
    53
    Likes:
    0
    When i give serial input data it print in lcd along with one special character.....
    For Example:
    input = Get Data

    lcd = Get Data#

    Anybody help me to solve this issue.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. M. Tamilarasan

    M. Tamilarasan Member

    Joined:
    Nov 6, 2013
    Messages:
    53
    Likes:
    0

    How to clear the unwanted character displaying in LCD
     
  6. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    Always clear the whole display before updating it.
     
  7. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,145
    Likes:
    907
    Location:
    Rochdale UK
    Is the character always at the end? In the string library there are string functions to eliminate characters from strings.

    If you use '#' as the delimiting character on 'strtok()' You can get rid of it...
     
  8. M. Tamilarasan

    M. Tamilarasan Member

    Joined:
    Nov 6, 2013
    Messages:
    53
    Likes:
    0
    Thanks for your information...!!!!!
     
  9. M. Tamilarasan

    M. Tamilarasan Member

    Joined:
    Nov 6, 2013
    Messages:
    53
    Likes:
    0
    How to deleted the data stored in SD card line by line using arduino
     

Share This Page