-->
Page 1 of 1

Changing the port used for reading one wire device

PostPosted: Wed Jan 17, 2018 2:00 pm
by Alberto_2
Hello to everyone! This is my first post.

I want to read several ( three) DS18B20 and print the temperature value on an oled display. The problem I see, is that both function use the same port (D4) so both things cannot be done unless it is possible to re-assign a different port for reading the one wire device. Is it possible? If the answer is yes could be possible to have an example on how to accomplish it.

Thank you very much in advance

Alberto

Re: Changing the port used for reading one wire device

PostPosted: Fri Jan 19, 2018 1:43 pm
by Alberto_2
Ok solved! Reading more carefully the documentation I discover that the I2C pins (SDA & SCL) can be changed with the i2c.setup instruction. Everything works as it should.

Alberto