Skip to content

Changing Address after defining #119

Answered by orgua
andiatbaden asked this question in Q&A
Discussion options

You must be logged in to vote

something like that should work, basic c tricks. hacked together and untested though!

  • first just globally declare the variable
  • later define the the variable (and also redefine it if needed)
#include "OneWireItem.h"
#include "OneWireHub.h"
#include "DS2405.h"

auto hub    = OneWireHub(pin_onewire);
OneWireItem ds2405;


void setup()
{
    const byte_value = read ...;
    ds2405 = DS2405( DS2405::family_code, 0x00, 0x00, 0x05, 0x24, 0xDA, byte_value );
    ...
}

...

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@andiatbaden
Comment options

@orgua
Comment options

Answer selected by orgua
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants