Hi all,
First post here, I keep getting this error any help would be appreciated. I'm following along with the tutorial for the pyb. TIA
PYB: sync filesystems
PYB: soft reboot
MicroPython v1.8.7 on 2017-01-08; PYBLITEv1.0 with STM32F411RE
Type "help()" for more information.
>>> sw = pyb.Switch()
>>> sw.value()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Switch' object has no attribute 'value'
>>> import pyb
>>> sw = pyb.Switch()
>>> sw.value()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Switch' object has no attribute 'value'
>>> from pyb import Switch
>>> sw = pyb.Switch()
>>> sw.value()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'Switch' object has no attribute 'value'
>>>
AttributeError: 'Switch' object has no attribute 'value'
Re: AttributeError: 'Switch' object has no attribute 'value'
You're using an extremely old version of MicroPython.
The .value() attribute was added in 1.9.1 (you're using 1.8.7) and the latest version is 1.9.4
The .value() attribute was added in 1.9.1 (you're using 1.8.7) and the latest version is 1.9.4
Re: AttributeError: 'Switch' object has no attribute 'value'
Thanks!
I have since updated the board and have no issue.
I have since updated the board and have no issue.