Just starting out have a question



  • So I'm just starting out and in an effort to get wife approval I plan on making a night light for our son. I have all the parts on order and want to add in a radio so that I can hook into it later on.

    The problem is I don't have a gateway yet (still reading up on the Rasberry Pi 2/OpenHab/MQTT which is my current intended gateway system.)

    So the question is it possible to set up a node prior to the gateway or would I have to recode the light once I get the gateway set up?

    Also is it possible to power the NRF24Lo1 radio from the 3.3V output of an Arduino Uno? or is it better to get a voltage regulator?

    I plan on making my nodes with Pros or Nanos but this light is going to be using an Uno and I have a second one for prototyping and want to play with the radios and don't want to fry them.



  • @Chaotic I can answer second question - you can power radio from on-board 3.3V regulator from Uno or Leonardo. I use this setup without any problems.
    First question - not complete understand it. If you manage assign node ID to sensor (using gateway or manually edit EEPROM) - sensor node can operate without controller/gateway



  • You can certainly have a node set up but it would just sit there asking for a node ID all day. If you want to be able to control it until you get a controller set up, slap a NRF24Lo1 on another arduino and use it plugged into a computer as a serial gateway. You'll need to send the node id manually(no controller to do it for you) through the serial consol and then it will start sending the mysensors encoded messages. You can also send commands in the same format so you'll need to read up on the API.

    Once you get a controller remember for flash the eeprom clear sketch so it can request a new node ID.



  • @pete1450 said:

    You can certainly have a node set up but it would just sit there asking for a node ID all day. If you want to be able to control it until you get a controller set up, slap a NRF24Lo1 on another arduino and use it plugged into a computer as a serial gateway. You'll need to send the node id manually(no controller to do it for you) through the serial consol and then it will start sending the mysensors encoded messages. You can also send commands in the same format so you'll need to read up on the API.

    Once you get a controller remember for flash the eeprom clear sketch so it can request a new node ID.

    That is an option I hadn't thought of. I already have 2 radios (bought a 2 pack of amazon to test/learn)

    I'll probably end up doing this since I a (very) quick read didn't show a way to set a variable with the current library which is one of the things I'd want to do with it. It is going to have a RTC on it and I plan on having it start/stop at a time controlled by a variable. Might change the colors via a variable too if I can figure that out (using neopixels so I think it should be possible)

    Any examples you could give of setting up something like that would be great 😉

    Looking at the API again it looks like there tell it your setting a custom variable I'll have to play around some more. Will give me something to do while I wait for the rest of my hardware to get here.



  • slight bump to this topic rather than starting a new one since I have some more questions

    Are there any example sketches for setting variables on a node? Thinking I'd want at least 2 variables.

    Is there a proper way for a node to report time to the controller or other nodes? This one will be powered 100% of the time so responding to messages shouldn't be a problem.

    I'm pretty sure I know the answer to this one but best way to set up a sketch to report the temp every X when it isn't the main function of the node.

    Thanks in advance.


 

329
Online

8.5k
Users

9.3k
Topics

98.5k
Posts