element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Just Encase
  • Challenges & Projects
  • Design Challenges
  • Just Encase
  • More
  • Cancel
Just Encase
Blog Blog 8 - Measure, send, receive, transform, store, display (updated with code)
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Just Encase to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: christophesky
  • Date Created: 30 Dec 2021 7:50 PM Date Created
  • Views 1054 views
  • Likes 10 likes
  • Comments 3 comments
  • node red
  • design_challenge
  • Ubuntu
  • Hammond Manufacturing Enclosures
  • Arduino MKR WAN 13000
  • influxdb
  • just_encase
Related
Recommended

Blog 8 - Measure, send, receive, transform, store, display (updated with code)

christophesky
christophesky
30 Dec 2021
Blog 8 - Measure, send, receive, transform, store, display (updated with code)

Its alive.

TLDR: Sensors + Ard MKR 1300 Sender -> LoRa -> Ard MKR 1300 Reciever ->Serial to Raspberry Pi -> Node Red Flow to process -> Write to Influx DB -> Display in Grafana.

Set up as below

image

Node Red

I have now updated my node red flow to make use of the split and switch:

image

Flow in more detail:

image

Serial Port Node

Configures the serial port for the raspberry pi <--> Arduino connected over USB.

image

CSV Node

My LoRA message payload is a comma seperated string of values, if any single sensor fails to return a value, the position in the string gets 999 as a value.

Columns gives the position for each sensor value coming over in the LoRa payload.

image

Split Node

The split node is told that hey, I am splitting my string using ... whatever character you chose, or as an array, or handle is as an object

image

Switch Node

This lovely node is the most useful, so you can take one payload message which contains multiple sensor readings and then create n outputs to write to Influx

image

Influx Node

Each switch node output has a matching InfluxDB node, in this case the measurement is temp to be written to Influx

image

* I am still figuring out node red and the useful, and dont do thats. So will update as I go. (or please do not take my example as a good example of how to do it, or at least not quite yet anyway).

Dashboard

And a quick dashboard view using Grafana, RSSI, Pressure, Temp, Humidity at the moment.

image

  • Sign in to reply

Top Comments

  • christophesky
    christophesky over 3 years ago +1
    Next, finish sensor calibrations (TDS, pH, Turbidity). Add water temp probe. Finish code refactoring. Get it all seated in the enclosure and outside in the pond. Measure measure measure. :)
  • christophesky
    christophesky over 3 years ago

    My sketch file (ino) for sensors in a working state can be found here: https://github.com/christopherusky/just_encase_challenge/blob/main/software/arduino/sensorsender.ino

    I am refactoring at the moment to make it a little cleaner and adding in mark up on what each piece does.

    I have temporarily removed the TDS function as this is not behaving as expected and I am unsure if my code OR hardware, or a possibly a mix of both (or it might justy be the price of onions today?)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • christophesky
    christophesky over 3 years ago

    I have now included the flow file here: https://github.com/christopherusky/just_encase_challenge/blob/main/software/raspberrypi/node-red-flow.txt

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • christophesky
    christophesky over 3 years ago

    Next, finish sensor calibrations (TDS, pH, Turbidity).
    Add water temp probe.

    Finish code refactoring.

    Get it all seated in the enclosure and outside in the pond.

    Measure measure measure. :)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube