![]() Void printBytes(uint8_t *addr, uint8_t count, bool newline=0)įor (uint8_t i = 0 i > 4, HEX) //prints the first 4 bits (most left) of addr in Hexadecimal system I have knocked about your code to hopefully do what you want but without having any hardware to test it on I cannot be sure if it will work (probably not) #include You should really go back and alter your last 2 posts to put the sketch in code tags. Serial.println(F("Found a DS2413 Dual Channel Switch")) Serial.println(F("Found a DS28E17 I2C Bridge")) OneWire.write(0x01) //Number of bytes to send (one) OneWire.write(0x4B) //0x4B is"Write Data With Stop" command ![]() Serial.print(addr&0x0f, HEX) //BitWise between addr e 00001111, allows to print the other 4 bits (on the right)īool write(uint8_t state) //command order based on datasheet ![]() Void printBytes(uint8_t* addr, uint8_t count, bool newline=0)įor (uint8_t i = 0 i >4, HEX) //prints the first 4 bits (most left) of addr in Hexadecimal system
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |