help DS18x20 sensor in STM32F7DISC
Posted: Sun Apr 17, 2016 2:04 pm
I build micropython 1.7 with STM32F7DISC board, it works fine. When I connect a DS1820 sensor, it is not work, but Same DS1820 sensor is work in pyboard v1.0.
>>> # STM32F7DISCO
>>> from pyb import Pin
>>> Pin('D2', Pin.OUT_PP).low()
>>> Pin('D0', Pin.OUT_PP).high()
>>> pyb.delay(100)
>>>
>>> from ds18x20 import DS18X20
>>> d = DS18X20(Pin('D1'))
>>> d.read_temp()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ds18x20.py", line 55, in read_temp
IndexError: list index out of range
>>>
And I found I2C1 is not work correctly too.
>>> # STM32F7DISCO
>>> from pyb import Pin
>>> Pin('D2', Pin.OUT_PP).low()
>>> Pin('D0', Pin.OUT_PP).high()
>>> pyb.delay(100)
>>>
>>> from ds18x20 import DS18X20
>>> d = DS18X20(Pin('D1'))
>>> d.read_temp()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ds18x20.py", line 55, in read_temp
IndexError: list index out of range
>>>
And I found I2C1 is not work correctly too.