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. Controllers
  3. Vera
  4. issues with light lux sensor and trinket pro

issues with light lux sensor and trinket pro

Scheduled Pinned Locked Moved Vera
12 Posts 3 Posters 4.0k 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.
  • daulagariD Offline
    daulagariD Offline
    daulagari
    Hero Member
    wrote on last edited by
    #2

    My LightLuxSensor sketch has:

    #define CHILD_ID_LIGHT 0
    #define LIGHT_SENSOR_ANALOG_PIN 0
    

    The CHILD_ID_LIGHT is used for gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); indicating that the node should request an address/use the address in EEPROM.

    The LIGHT_SENSOR_ANALOG_PIN is used in the LightSensor but not in the LightLuxSensor so can be ignored.

    First time I see a Trinket Pro 5V, but I see no reason things should not be working.
    How about the radio, is that connected fine?

    1 Reply Last reply
    0
    • 5546dug5 Offline
      5546dug5 Offline
      5546dug
      wrote on last edited by
      #3

      yes it is connected ok as other sensors do report to gw
      what happens to A4 A5 they seem not to be given as a input or output
      the trinket pro has available usb power but no pin D 2 or D 7.

      But it is reacting as though the trinket does not send info to gw

      not quite sure how to debug this yet and still reading up and looking through forums

      1 Reply Last reply
      0
      • daulagariD Offline
        daulagariD Offline
        daulagari
        Hero Member
        wrote on last edited by
        #4

        If the Trinklet has no D7 how did you connect the NRF24L01+ transceiver CSN/CS pin?

        1 Reply Last reply
        0
        • 5546dug5 Offline
          5546dug5 Offline
          5546dug
          wrote on last edited by
          #5

          my understanding is CSN is connected to pin D10

          I use pins D9 to D13 on boards

          1 Reply Last reply
          0
          • daulagariD Offline
            daulagariD Offline
            daulagari
            Hero Member
            wrote on last edited by
            #6

            In my schematic of an Arduino Nano D7 is connected to pin 10 and http://www.mysensors.org/build/connect_radio is written with the Arduino Nano in mind:

            Arduino_Nano_pinout.png

            1 Reply Last reply
            0
            • 5546dug5 Offline
              5546dug5 Offline
              5546dug
              wrote on last edited by
              #7

              I think I am right, the port pins(? ) used for D9 toD13( the points where the DuPont wires are attached) are PB1 toPB5 which are the acual pins 13 to 17 on the ATmega (32 pin MLF) 328 chip on the Nano and Mini Pro which are the same chip pins on the Adafruit Trinket Pro.

              The pins not available for use on the trinket pro are chip pins PD2 (INTO) and PD7 (AIN1)

              so I think the wiring is ok .

              1 Reply Last reply
              0
              • daulagariD Offline
                daulagariD Offline
                daulagari
                Hero Member
                wrote on last edited by
                #8

                From the same schematics I have of the same PB1 to PB5 mapping:

                Arduino_Nano_PB_mapping.png

                The pins not available for use on the trinket pro are chip pins PD2 (INTO) and PD7 (AIN1)

                Above you mentioned D 2 and D 7 but indeed it looks like PD2 (INTO) and PD7 (AIN1) and these are also not connected on the Arduino Nano.

                Did you have a look at the serial output of the sketch?

                1 Reply Last reply
                0
                • 5546dug5 Offline
                  5546dug5 Offline
                  5546dug
                  wrote on last edited by
                  #9

                  I see now what you meant on your drawing d7 goes to chip J1-10

                  but doesn't CSN connect to D10 which is pin J1-13?

                  1 Reply Last reply
                  0
                  • 5546dug5 Offline
                    5546dug5 Offline
                    5546dug
                    wrote on last edited by
                    #10

                    so I found a Nano and programed it for lux reading and it all is ok
                    wonder what is the issue with trinket?

                    1 Reply Last reply
                    0
                    • daulagariD Offline
                      daulagariD Offline
                      daulagari
                      Hero Member
                      wrote on last edited by
                      #11

                      Did you have a look at the serial output of the Light Lux Sensor sketch on the Trinket?

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mikemayers
                        wrote on last edited by mikemayers
                        #12

                        I have the same question too... Pin A4 & A5 is not define in the sketch, but pin A0 is. How does the node know which pins to grab the values from? Are we not using Pin A4 & A5? and What happens to pin A0?

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


                        15

                        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