Search found 11 matches

by 41536172@qq.com
Wed Aug 17, 2016 1:36 am
Forum: ESP8266 boards
Topic: Official MicroPython MQTT client
Replies: 19
Views: 44086

Re: Official MicroPython MQTT client

but when i 'client=mqtt.MQTTClient(1, 192.168.1.88, 0)'
the prompt shows: invalid syntax for number
by 41536172@qq.com
Wed Aug 17, 2016 1:09 am
Forum: ESP8266 boards
Topic: Official MicroPython MQTT client
Replies: 19
Views: 44086

Re: Official MicroPython MQTT client

i copied the file 'simple.py' which looks like the module file into micropython/esp8266/scripts and rename it as 'mqtt.py' and then i made the new port file ,wrote it into my 8266.

and then i can import mqtt it looks work!
by 41536172@qq.com
Tue Aug 16, 2016 2:21 pm
Forum: General Discussion and Questions
Topic: Sense a voltage and turn on a pin
Replies: 5
Views: 5951

Re: Sense a voltage and turn on a pin

and you also need to know about "PID"control.
by 41536172@qq.com
Tue Aug 16, 2016 2:09 pm
Forum: General Discussion and Questions
Topic: How do i use micropython to measure voltages
Replies: 4
Views: 4997

Re: How do i use micropython to measure voltages

1. you may need the resistance to make the voltage no more than one V;
2.0-1 V map to 0-1023 in ADC
by 41536172@qq.com
Tue Aug 16, 2016 2:06 pm
Forum: ESP8266 boards
Topic: Official MicroPython MQTT client
Replies: 19
Views: 44086

Re: Official MicroPython MQTT client

how can i use the 'setup.py'?
by 41536172@qq.com
Tue Aug 16, 2016 10:39 am
Forum: ESP8266 boards
Topic: help,can't init the RTC!
Replies: 7
Views: 8751

Re: help,can't init the RTC!

What is "weekday" mean? The documentation is wrong. You should use the "datetime" method. Also, the tuple is actually (year, month, day, weekday, hour, minute, second, millisecond). >>>import machine >>>rtc=machine.RTC() >>>rtc.datetime((2014, 5, 1, 0, 4, 13, 0, 0)) >>>rtc.datetime() (2014, 5, 1, 0,...
by 41536172@qq.com
Tue Aug 16, 2016 10:34 am
Forum: ESP8266 boards
Topic: help,can't init the RTC!
Replies: 7
Views: 8751

Re: help,can't init the RTC!

thank you very much! And i want to study about the RTC and TIMER, how many timers are there in 8266? and where can i find the documentation? the offical documentation is too brief i think. The documentation is wrong. You should use the "datetime" method. Also, the tuple is actually (year, month, day...
by 41536172@qq.com
Tue Aug 16, 2016 8:43 am
Forum: ESP8266 boards
Topic: help,can't init the RTC!
Replies: 7
Views: 8751

help,can't init the RTC!

>>>import machine >>>rtc=machine.RTC() >>>rtc.init((2014, 5, 1, 4, 13, 0, 0, 0)) Traceback (most recent call last): File "<stdin>, line 1, in <module> AttributeError: ‘RTC’ object has no attribute 'init' but i did this according here: http://docs.micropython.org/en/latest/esp8266/library/machine.RTC...
by 41536172@qq.com
Mon Aug 15, 2016 3:17 pm
Forum: ESP8266 boards
Topic: uPyLoader - simple file transfer and communication
Replies: 54
Views: 73039

Re: uPyLoader - simple file transfer and communication

very good,thank you! i am using it now!
by 41536172@qq.com
Sun May 22, 2016 3:57 pm
Forum: ESP8266 boards
Topic: 8266can‘t read the right data from dht11
Replies: 16
Views: 14057

8266can‘t read the right data from dht11

here is my code: def conn(): data=[] i=0 dht11=machine.Pin(5, machine.Pin.OUT) dht11.high() time.sleep(1) dht11.low() time.sleep_ms(20) dht11.high() time.sleep_us(40) dht11=machine.Pin(5, machine.Pin.IN, machine.Pin.PULL_UP) while dht11.value()==0: continue while dht11.value()==1: continue while i<4...