• Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Register
  • Login
MakerGram Logo

MakerGram

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups

Help needed: Arduino Wireless Notice Board project

Arduino
6
28
6.4k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • salmanfaris
    salmanfaris last edited by 16 Mar 2020, 15:28

    @rafitc99 , @SAFVAN did you tried the @arunksoman suggestion?

    1 Reply Last reply Reply Quote 0
    • S
      SAFVAN last edited by 18 Mar 2020, 15:48

      Now message is displaying with mobile number, date, time.
      I want filter the actual message only.

      salmanfaris 1 Reply Last reply 18 Mar 2020, 16:13 Reply Quote 0
      • salmanfaris
        salmanfaris @SAFVAN last edited by 18 Mar 2020, 16:13

        @SAFVAN what was the solution with the previous problem?

        rafitc99 1 Reply Last reply 22 Mar 2020, 16:36 Reply Quote 0
        • rafitc99
          rafitc99 @salmanfaris last edited by 22 Mar 2020, 16:36

          @salmanfaris tried @arunksoman suggestion , c_str() instead to_charArray().. But want to parse SMS body only. Now working on that.

          C 1 Reply Last reply 14 Jun 2023, 07:13 Reply Quote 1
          • 3 years later
          • C
            codelery @rafitc99 last edited by 14 Jun 2023, 07:13

            @rafitc99 what is the final code? Could you please share it with us? I have been battling with a similar project.

            Which Arduino board did you use?

            thanks

            rafitc99 1 Reply Last reply 15 Jun 2023, 01:17 Reply Quote 0
            • rafitc99
              rafitc99 @codelery last edited by 15 Jun 2023, 01:17

              @codelery You can use any Arduino board. So far as i remember, we used Arduino UNO.

              Somehow i found the code in my gist. It was a 3 year old project. So, i don't remember most of the things

              Code:

              #include <SoftwareSerial.h>
              #include <SPI.h>
              #include <DMD.h>
              #include <TimerOne.h>
              #include "SystemFont5x7.h"
              #include "Arial_black_16.h"
              
              #define ROW 1
              #define COLUMN 1
              #define FONT Arial_Black_16
              
              DMD led_module(ROW, COLUMN);
              
              String st;
              const char *msg;
              unsigned int LengMsg;
              char finalMsg[100] = "";
              SoftwareSerial mySerial(3, 2);
              
              void scan_module() {
                led_module.scanDisplayBySPI();
              }
              
              void setup() {
                Timer1.initialize(2000);
                Timer1.attachInterrupt(scan_module);
                led_module.clearScreen( true );
              
                Serial.begin(9600);
                mySerial.begin(9600);
                Serial.println("Starting...");
                delay(1000);
                mySerial.println("AT");
                updateSerial();
                mySerial.println("AT+CMGF=1");
                updateSerial();
                mySerial.println("AT+CNMI=1,2,0,0,0");
                updateSerial();
              }
              
              void loop() {
                //  pollSms();
                displayMessage();
                delay(500);
              
                //Start print in led matrix
                led_module.selectFont(FONT);
                led_module.drawMarquee(finalMsg, LengMsg, (32 * ROW), 0);
                long start = millis();
                long timming = start;
                boolean flag = false;
                while (!flag) {
                  if ((timming + 20) < millis()) {
                    flag = led_module.stepMarquee(-1, 0);
                    timming = millis();
                  }
                }
              }
              
              //------GSM Helper
              
              void displayMessage()
              {
                delay(500);
                String msg = "";
                int start = 0, endPoint = 0;
                finalMsg[100] = "";
                while (Serial.available())
                {
                  mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
                  //     parseData(mySerial.readString());//Calls the parseData function to parse SMS
                }
                while (mySerial.available())
                {
                  msg = mySerial.readString();//Forward what Software Serial received to Serial Port
                }
              
                if (msg.length() > 1) {
                  start = msg.indexOf('*') + 1;
                  endPoint = msg.indexOf('#') - 1;
                  int count = 0;
                  if (start > 1 && endPoint > 1) {
                    strcpy( finalMsg, "");
              
                    for (int i = start; i <= endPoint; i++) {
                      finalMsg[count] = msg[i];
                      count++;
                    }
                    Serial.println("SMS Received: ");
                    Serial.println(finalMsg);
                    LengMsg = count;
                  }
                  else{
                    return false;
                  }
                }
              }
              
              void updateSerial()
              {
                delay(500);
                while (Serial.available())
                {
                  mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
                }
                while (mySerial.available())
                {
                  Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
                }
              }
              

              NB: The sms body should be between start and hash
              Eg: * Hello Makers! #

              C 2 Replies Last reply 30 Jun 2023, 21:38 Reply Quote 0
              • C
                codelery @rafitc99 last edited by 15 Jun 2023, 10:22

                @rafitc99 thank you so much. I will try it out and see if it will work.

                1 Reply Last reply Reply Quote 0
                • 15 days later
                • C
                  codelery last edited by 30 Jun 2023, 21:21

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • C
                    codelery @rafitc99 last edited by 30 Jun 2023, 21:38

                    @rafitc99 I tried this code, but the SMS is always corrupted. I got "Hello peopl⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮⸮
                    "

                    instead of "Hello people of the village who work day and night to make sure all is well"

                    salmanfaris 1 Reply Last reply 4 Jul 2023, 18:05 Reply Quote 0
                    • salmanfaris
                      salmanfaris @codelery last edited by 4 Jul 2023, 18:05

                      @codelery Could you please share your code for checking?

                      C 1 Reply Last reply 5 Jul 2023, 17:07 Reply Quote 0
                      12 out of 28
                      • First post
                        12/28
                        Last post

                      Recent Posts

                      • @codelery Awesome. That's great news. Kudos to @rafitc99 . 🙌

                        @codelery Please keep us updated about your project, looking forward to seeing it in action 🤩

                        7 Jul 2023, 06:58 • read more
                      • C

                        @rafitc99 I changed the buffer and that solved the problem. Thanks a lot for coming to my rescue.

                        7 Jul 2023, 00:44 • read more
                      • C

                        @salmanfaris I did change the buffer size and everything is working perfectly. Thanks coming to my rescue.

                        7 Jul 2023, 00:41 • read more
                      • @codelery said in Help needed: Arduino Wireless Notice Board project:

                        I am using the hardware serial (pin 0 and 1 on Arduino Uno)

                        As @rafitc99 mentioned, you need to expand the Serila buffer, in the hardware serial also the Arduino board package implements a 64-byte ring buffer for send and receive on the hardware serial messages. So you need to change that to 256 as per your message length.

                        6 Jul 2023, 12:22 • read more
                      • C

                        @rafitc99 The thing is that I am not using the SoftwareSerial library in receiving the message from the first microcontroller. I am using the hardware serial (pin 0 and 1 on Arduino Uno)

                        6 Jul 2023, 01:45 • read more
                      By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
                      Copyright © 2023 MakerGram, All rights reserved.
                      Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct