Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Using AltSoftSerial with Mayfly

Home Forums Mayfly Data Logger Using AltSoftSerial with Mayfly

Viewing 3 reply threads
  • Author
    Posts
    • #12824
      Adam Gold
      Participant

      I’m currently using NeoSWSerial to take water level measurements using a Maxbotix 7383 HRXL-WRLST sensor (pins: neoSSerial1Rx = 11, neoSSerial1Tx = -1), but I am interested in using AtlSoftSerial because it is more accurate. Does anyone know the Mayfly pin designations for AltSoftSerial? Is it possible to use one of the Grove ports like I am currently using with NeoSWSerial? Thanks in advance for any advice!

    • #12825
      Sara Damiano
      Moderator

      With AltSoftSerial, data in to the Mayfly goes on pin 6, out from Mayfly on pin 5. It’s kind-of a pain because the Tx and Rx are broken into different Grove ports, but for something like the Maxbotix that you only need Rx for, it’s fine.

    • #15837
      Scott Ensign
      Participant

      I’m struggling to use AltSoftSerial in place of Software Serial to connect an Atlas-Scientific Color sensor to a Mayfly. The script below successfully communicates and reports sensor data as expected with Software Serial (with lines 21 and 26 active instead of lines 22 and 27 as shown below). As shown below I don’t get any data from the sensor. Any advice?

       

    • #15838
      Scott Ensign
      Participant

      Problem solved. As Sara has noted before, the AltSoftSerial can only use pin 6 on the Mayfly for receiving and pin 5 for transmitting. So, while the sketch worked with Software Serial as shown above (and would have worked by defining pin 6 for transmitting and pin 5 for receiving), my pairing of the sensor rx and tx wires to the Grove jack was wrong. See lines 17 and 18 above; I swapped the wiring from the sensor to the Grove jack and now get data from the sensor. This is what the  portion of the sketch in question should look like to work with AltSoftSerial:

       

Viewing 3 reply threads
  • You must be logged in to reply to this topic.