but when i 'client=mqtt.MQTTClient(1, 192.168.1.88, 0)'
the prompt shows: invalid syntax for number
Search found 11 matches
- Wed Aug 17, 2016 1:36 am
- Forum: ESP8266 boards
- Topic: Official MicroPython MQTT client
- Replies: 19
- Views: 44136
- Wed Aug 17, 2016 1:09 am
- Forum: ESP8266 boards
- Topic: Official MicroPython MQTT client
- Replies: 19
- Views: 44136
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!
and then i can import mqtt it looks work!
- Tue Aug 16, 2016 2:21 pm
- Forum: General Discussion and Questions
- Topic: Sense a voltage and turn on a pin
- Replies: 5
- Views: 5963
- Tue Aug 16, 2016 2:09 pm
- Forum: General Discussion and Questions
- Topic: How do i use micropython to measure voltages
- Replies: 4
- Views: 5011
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
2.0-1 V map to 0-1023 in ADC
- Tue Aug 16, 2016 2:06 pm
- Forum: ESP8266 boards
- Topic: Official MicroPython MQTT client
- Replies: 19
- Views: 44136
- Tue Aug 16, 2016 10:39 am
- Forum: ESP8266 boards
- Topic: help,can't init the RTC!
- Replies: 7
- Views: 8771
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,...
- Tue Aug 16, 2016 10:34 am
- Forum: ESP8266 boards
- Topic: help,can't init the RTC!
- Replies: 7
- Views: 8771
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...
- Tue Aug 16, 2016 8:43 am
- Forum: ESP8266 boards
- Topic: help,can't init the RTC!
- Replies: 7
- Views: 8771
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...
- Mon Aug 15, 2016 3:17 pm
- Forum: ESP8266 boards
- Topic: uPyLoader - simple file transfer and communication
- Replies: 54
- Views: 73820
Re: uPyLoader - simple file transfer and communication
very good,thank you! i am using it now!
- Sun May 22, 2016 3:57 pm
- Forum: ESP8266 boards
- Topic: 8266can‘t read the right data from dht11
- Replies: 16
- Views: 14128
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...