Skip to content
  • 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. Announcements
  3. šŸ’¬ What's all the fuss about?
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

šŸ’¬ What's all the fuss about?

Scheduled Pinned Locked Moved Announcements
34 Posts 18 Posters 5.6k Views 20 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.
  • Matias_SAMSM Offline
    Matias_SAMSM Offline
    Matias_SAMS
    wrote on last edited by
    #23

    Hello! Forgive me if I bother you, or if I ask some stupidity ... but I wanted to ask you something I can not find anywhere.
    I already have a Relay node and a Sensor Node with a gateway running. I am using MYSController. Everything works OK.
    I have concerns about some code syntax.
    I can not finish understanding regarding the reading or writing of states in a binary device the syntax:

    state? RELAY_ON: RELAY_OFF
    or
    state? "true": "false"

    What does the "?" Mean. How should I understand that line? Because there are times when it appears inverted:
    state? RELAY_OFF: RELAY_ON
    or
    state? "false": "true"

    Thank you!

    1 Reply Last reply
    0
    • bjacobseB Offline
      bjacobseB Offline
      bjacobse
      wrote on last edited by
      #24

      @matias_sams said in šŸ’¬ What's all the fuss about?:

      state? "true": "false"

      It's known in C language as conditional operator
      https://en.wikipedia.org/wiki/%3F:#C

      1 Reply Last reply
      0
      • mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by mfalkvidd
        #25

        To add to the previous answer, in the relay example sketch, ? is used to handle that some relays are active low, some are active high.

        From the sketch:

        #define RELAY_ON 1  // GPIO value to write to turn on attached relay
        #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
        
        1 Reply Last reply
        0
        • Matias_SAMSM Offline
          Matias_SAMSM Offline
          Matias_SAMS
          wrote on last edited by
          #26

          !!!
          Thank you very much community, you are great!

          1 Reply Last reply
          0
          • T Offline
            T Offline
            TalhaYounis
            wrote on last edited by
            #27

            Hi, I'm working on project of mobile app to measure the CO2, LPG gas , Smog through MQ135 and MQ7 sensors. Kindly help me what should I do??
            Give me suggestions....Thank you

            mfalkviddM 1 Reply Last reply
            0
            • T TalhaYounis

              Hi, I'm working on project of mobile app to measure the CO2, LPG gas , Smog through MQ135 and MQ7 sensors. Kindly help me what should I do??
              Give me suggestions....Thank you

              mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #28

              Welcome to the MySensors forum @talhayounis

              Th best way to get started with MySensors is to first read the getting started guide. Then you can move on to https://www.mysensors.org/build/gas which has an example sketch to use with MQ135 and MQ7.

              The best way is usually to get a gateway and a simple node running, and then expand from that.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                viti
                wrote on last edited by
                #29
                This post is deleted!
                YveauxY 1 Reply Last reply
                0
                • V Offline
                  V Offline
                  viti
                  wrote on last edited by
                  #30
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • V viti

                    This post is deleted!

                    YveauxY Offline
                    YveauxY Offline
                    Yveaux
                    Mod
                    wrote on last edited by
                    #31

                    @viti please stop crossposting your questions!

                    http://yveaux.blogspot.nl

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      ZhangCan
                      wrote on last edited by
                      #32

                      Smaller sensors require lighter lenses (for equivalent angle of view, zoom range, build quality and aperture range).

                      1 Reply Last reply
                      0
                      • I Offline
                        I Offline
                        IceTalon
                        Banned
                        wrote on last edited by
                        #33

                        Hi everyone, I’m new here and happy to join the forum. Looking forward to learning and sharing with you all.

                        1 Reply Last reply
                        1
                        • skywatchS Offline
                          skywatchS Offline
                          skywatch
                          wrote on last edited by
                          #34

                          Welcome - I hope you find it inspiring, educational and practical. There is lots to learn and more to achieve.

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


                          13

                          Online

                          11.7k

                          Users

                          11.2k

                          Topics

                          113.0k

                          Posts


                          Copyright 2019 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
                          • OpenHardware.io
                          • Categories
                          • Recent
                          • Tags
                          • Popular