UiFLOW. I2C Programing
-
Hello, any helpful info on working with I2C ? Trying to interface an ADC1115 to core2 and
not clear on start stop, acknowledge bits.. Working from T.I. datasheet. Tying to write
directly to address pointer, configuration register, with I2C read/write data instruction. Thanks for any help -
Hello @timtimw
the I2C functions in UIFlow will take care of start, stop and ack bits for you. Have you tried to use the I2C functions provided under
Hardwares
-I2C
?I suggest you start with an I2C scan to see if the ADC1115 is found and the wiring is correct.
Thanks
Felix -
@timtimw said in UiFLOW. I2C Programing:
Hello, any helpful info on working with I2C ? Trying to interface an ADC1115 to core2 and
not clear on start stop, acknowledge bits.. Working from T.I. datasheet. Tying to write
directly to address pointer, configuration register, with I2C read/write data instruction. Thanks for any helpAs Felmue has said, the start/stop/ACK are all handled behind the scenes all you need to do is use the blocks to read or write to the registers and decipher the data sent.
-
Yup thanks,
Works like a charm now with I2C write and read direct to registers. Easy after some hit and miss
with data encoding. R/W 'short' with 'big' decode/ encode was the magic.
Thanks for the help
. -
@timtimw Can you provide a screenshot, I tried to connect other I2C modules without success.
Thanks in advance for sharing -
@timtimw
That is awesome that you were able to get I2C to work with the ADC1115. I would be very interested in your ADC project at many of us discovered the built-in ADC has a few challenges. Again as Arno added could you please post /share your code? I am trying to use DS18B20 with UIFlow but am having some difficulties.Thanks Brian
-
@bschwahn ds18b20 very easy to use with https://github.com/stonatm/UiFlow-custom-blocks/tree/master/ds18b20
-
Thanks Arno for the push in the right direction. I was able to get this to work on my Core 2 EXCEPT using G21 or G22.
I will write up a tutorial on try to find a way to post/share.
Thanks again Arno!