Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. combining sketches

combining sketches

Scheduled Pinned Locked Moved General Discussion
3 Posts 3 Posters 2.7k Views 2 Watching
  • 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.
  • 5546dug5 Offline
    5546dug5 Offline
    5546dug
    wrote on last edited by
    #1

    ok here is the ?

    to combine two or more sketches what are the issues?

    As I see it say combining two sketches would require all the code from both with the duplications removed, inspection that size is less than max allowed (30 kbs? or so) and availability of pins.

    So do I add all of one sketch in define,setup and loop and then add bits needed and libraries required after the first sketch. Then compile and see what I get prior to upload. OR

    Require all of both sketches complete one after the other.

    Does the arduino/gw care if the code is shared or is it only one sensor per mini pro? Just trying to cut back on the number of p/s and boards I have running - it seems to be getting to be too many wires

    BulldogLowellB B 2 Replies Last reply
    0
    • 5546dug5 5546dug

      ok here is the ?

      to combine two or more sketches what are the issues?

      As I see it say combining two sketches would require all the code from both with the duplications removed, inspection that size is less than max allowed (30 kbs? or so) and availability of pins.

      So do I add all of one sketch in define,setup and loop and then add bits needed and libraries required after the first sketch. Then compile and see what I get prior to upload. OR

      Require all of both sketches complete one after the other.

      Does the arduino/gw care if the code is shared or is it only one sensor per mini pro? Just trying to cut back on the number of p/s and boards I have running - it seems to be getting to be too many wires

      BulldogLowellB Offline
      BulldogLowellB Offline
      BulldogLowell
      Contest Winner
      wrote on last edited by
      #2

      @5546dug

      I found this tutorial, but maybe it is easier to ask who may have combined the two you are trying ;)

      lots of folks here creating multi-purpose sketches, so your problem may be solved already!

      1 Reply Last reply
      0
      • 5546dug5 5546dug

        ok here is the ?

        to combine two or more sketches what are the issues?

        As I see it say combining two sketches would require all the code from both with the duplications removed, inspection that size is less than max allowed (30 kbs? or so) and availability of pins.

        So do I add all of one sketch in define,setup and loop and then add bits needed and libraries required after the first sketch. Then compile and see what I get prior to upload. OR

        Require all of both sketches complete one after the other.

        Does the arduino/gw care if the code is shared or is it only one sensor per mini pro? Just trying to cut back on the number of p/s and boards I have running - it seems to be getting to be too many wires

        B Offline
        B Offline
        boozz
        wrote on last edited by boozz
        #3

        @5546dug
        Is this perhaps a starting point? multiple sensors and code.

        BR

        Boozz

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        29

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular