Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Using GPy as a SMS module and interfacing with Arduino MEGA 2560

    Scheduled Pinned Locked Moved Discussion
    5 Posts 3 Posters 48 Views 3 Watching
    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.
    • B Offline
      Bartosz Karaban
      last edited by

      We are a team designing a system that uses sensors and actuators to control a large irrigation system for a farmer in northern Wisconsin. The area is quite rural, and our original plan was to use GSM to send text messaged to the farmer, but we are finding out that 2G and 3G is being dropped across the united states, leaving us with LTE.

      We are using an Arduino MEGA 2560 to interface with the irrigation system, and we are finding out that the next option we had (a SIM7600 module) is too large for our enclosure.

      I have come across this GPy module. My plan now is to use the GPy to send/receive SMS from the farmer's cellphone, and to use the GPIO to communicate with the arduno (simple HIGH and LOW flags will do it). I cant find any example code anywhere for the module however. Where can I find some example code that shows how to control the GPIO and send/recieve text messages?

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Bartosz Karaban
        last edited by robert-hh

        @Bartosz-Karaban Better user UART. Both the MESG2560 and the GPY have spare UART ports for that purpose. You'll just need three wires, GND, TX <-> RX, RX <-> TX. UART are core features of both platforms and support a buffered communication.

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          Bartosz Karaban @robert-hh
          last edited by

          @robert-hh We are already using UART but if there are ways around it it will be considered. Where can I find example code for the GPy though is my main concern?

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @Bartosz Karaban
            last edited by

            @Bartosz-Karaban The Pycom documentation has quite a few examples. if you say, that you already use UART, is there a reason why you cannot use it, or are all UART ports of the MEGA already in use? If yes, you might use SPI. The GPY can only act as master, but the Arduino can be used in slave mode. A little bit more tricky than UART. There are also Arduino libs for a software UART, which work reasonably well.

            1 Reply Last reply Reply Quote 0
            • G Offline
              Gijs
              last edited by

              All the examples in the documentation should work on all devices (excluding the network examples that are not available on the GPy of course)

              As for the text messages, first, you'll have to get a carrier that supports text messages (SMS) over NB-IoT or CAT-M1 (they exist, and around the office I've seen it work in the past, not exactly sure how it works with the phonenumbers though)
              In the AT manual, https://docs.pycom.io/gitbook/assets/Monarch-LR5110-ATCmdRefMan-rev6_noConfidential.pdf, around section 6, there is a whole bunch of AT commands listed related to SMS. This is not built-in micropython functionality directly, as its not common to go the SMS route, but for farmes I get that you want to make it as convenient as possible.
              You can send the commands using lte.send_at_cmd('...') from the LTE api

              1 Reply Last reply Reply Quote 1

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom