Search found 44 matches

by giants
Wed Jun 19, 2019 12:46 pm
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

Thank you. I think mabye is good for me start to "play" with python for have more confidence and second step ESP or other boards.

Have a good day
Sergio
by giants
Wed Jun 19, 2019 10:29 am
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

Hi
finally work , be honest with you i change side and i download the new firmware for the ESP8266.
Thank you for your patience. For sure i need your help in the future :D :D :D :D

Sergio
by giants
Mon Jun 17, 2019 5:52 pm
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

Code: Select all

from machine import Pin, I2C
import RFD77402

from time import sleep


dist = rfd77 (I2C(-1, scl=Pin(5), sda=Pin(4), freq=400000))
dist.scan()
that is what i wrote in main.py.

and this is the board

Image
by giants
Mon Jun 17, 2019 6:10 am
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

Please forgive me i wrote in your same way but still doesn't work :cry: :cry: :cry: same error download ok exec(open('main.py').read(),globals()) [76] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 15, in <module> AttributeError: 'rfd77' object has no at...
by giants
Sun Jun 16, 2019 8:38 pm
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

and this is the message gave to me

Code: Select all

download ok
exec(open('main.py').read(),globals())
[76]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 15, in <module>
AttributeError: 'rfd77' object has no attribute 'scan'
Thank you
by giants
Sun Jun 16, 2019 8:37 pm
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

from machine import Pin, I2C from micropython import const from time import sleep """ Costanti """ ICSR = const(0x00)IER = const(0x02) Cmd_R = const(0x04) Dev_Status_R = const(0x06) Rslt_R = const(0x08) RsltCnfdR = const(0x0A) Cmd_CfgR_A = const(0x0C) Cmd_CfgR_B = const(0x0E) H2M_mbx = const(0x10) ...
by giants
Sun Jun 16, 2019 3:10 pm
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

Hi, i try to did but the first part work the scene doesn't this is the error compiler wrote to me download ok exec(open('main.py').read(),globals()) [76] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 15, in <module> AttributeError: 'rfd77' object has no...
by giants
Sun Jun 16, 2019 7:14 am
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Re: Call method and passed as a parameter

Hi , this is my library just start to grow up: from machine import Pin, I2C from micropython import const from time import sleep """ Costanti """ ICSR = const(0x00)IER = const(0x02) Cmd_R = const(0x04) Dev_Status_R = const(0x06) Rslt_R = const(0x08) RsltCnfdR = const(0x0A) Cmd_CfgR_A = const(0x0C) C...
by giants
Sat Jun 15, 2019 10:50 am
Forum: Programs, Libraries and Tools
Topic: Call method and passed as a parameter
Replies: 18
Views: 10351

Call method and passed as a parameter

Hi there ! Here i'm for ask a help. I start to wrote my first own class but gave me this error : AttributeError:'fd77? object has no attribute 'scan' I don't understand where the problem is. I post a little part of the code here . Library : class rfd77(object): def __init__ (self , data, clock): sel...