Search found 84 matches

by ernitron
Tue Jan 24, 2017 9:17 pm
Forum: ESP8266 boards
Topic: Micropython docs - DHT
Replies: 7
Views: 2817

Re: Micropython docs - DHT

It happened the same to me. No way to make it working with DHT11.
I use the dht11 shield from WeMos and D1 mini.

Can somebody confirm latest firmware and library work properly?
by ernitron
Wed Jan 11, 2017 11:52 pm
Forum: ESP8266 boards
Topic: Copy lots of files in the mcus
Replies: 4
Views: 1712

Re: Copy lots of files in the mcus

I'd give a try to ampy: ls *.txt | xargs -n 1 ampy --port /dev/ttyUSB0 --baud 115200 put (assuming all your txt files are in one directory) adjust port and especially baud to have the most reliability OR (with bash): for f in `ls *.txt`; do ampy put $f ; done; OR with webrepl (assuming 192.168.1.100...
by ernitron
Wed Jan 11, 2017 12:04 pm
Forum: ESP8266 boards
Topic: Running out of memory w/ API requests
Replies: 3
Views: 1325

Re: Running out of memory w/ API requests

Just a look at your code. In 4 nested loops how many times the condition is satisfied and the array growths? To check the problem I would put a stub (just a print?) instead of filling the array. If the problem is the same, we have an issue with urequests, otherwise it should be investigated how many...
by ernitron
Fri Jan 06, 2017 7:43 pm
Forum: ESP8266 boards
Topic: LCD 1602 - Library
Replies: 47
Views: 21406

Re: LCD 1602 - Library

@ernitron 1. Yes, using various HD44780s, 08x2, 16x1, 16x2, 16x4, 20x4, blue and yellow. 2. Yes, using both PCF8574 I2C backpacks and GPIO pins (4x data pins). ... Hi @mcauser, what a reply! I am flattered! I can't wait to assemble and test all this brilliant solution. Thanks... (just let me know w...
by ernitron
Fri Jan 06, 2017 9:09 am
Forum: ESP8266 boards
Topic: LCD 1602 - Library
Replies: 47
Views: 21406

Re: LCD 1602 - Library

I have found this https://github.com/dhylands/python_lcd and looks pretty much what I was looking for.

Questions:
1. Did anybody make it working with WeMos D1 Mini?
2. Will it work in both i2c and GPIO modes?
by ernitron
Fri Jan 06, 2017 8:30 am
Forum: ESP8266 boards
Topic: LCD 1602 - Library
Replies: 47
Views: 21406

LCD 1602 - Library

I made some research but I have found little about LCD 1602 and micropython. I am looking for a simple library to pilot an LCD 1602 from WeMos D1 Mini (or other esp8266). Looking for simple API to send text on line 1 or 2, maybe adjust dim. Things like that. Are any problem to drive from the 5V outp...
by ernitron
Thu Jan 05, 2017 5:26 pm
Forum: ESP8266 boards
Topic: Reading from UART and KeyboardInterrupt
Replies: 6
Views: 3170

Re: Reading from UART and KeyboardInterrupt

I see. You have to consider that UART is asynchronous. So it can happen anytime and everywhere in your code causing exception. My routine is faulty as the ^C in your case happens during the time.sleep. I suggest: 1. Make the loop tight (i.e. substitute the time.sleep with pass) 2. try-catch all othe...
by ernitron
Wed Jan 04, 2017 8:55 pm
Forum: ESP8266 boards
Topic: AttributeError: type object 'socket' has no attribute 'timeout'
Replies: 3
Views: 4081

Re: AttributeError: type object 'socket' has no attribute 'timeout'

Am I doing something wrong? No I guess, not. I had the same problem. Looks like socket.timeout is not implemented (or is not the correct exception that upython throws on timeout). I simply catch everything and that worked for me. s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.settimeout(2.0...
by ernitron
Wed Jan 04, 2017 7:42 pm
Forum: ESP8266 boards
Topic: Reading from UART and KeyboardInterrupt
Replies: 6
Views: 3170

Re: Reading from UART and KeyboardInterrupt

Well, first of all thanks for giving a try to the patch for control-c. I think that should be included in the original firmware as it doesn't hurt ;) I think the problem is that the read will fail and exit before the 14th char can be read. Therefore I would try a loop like: chars = bytearray() while...
by ernitron
Mon Jan 02, 2017 9:59 pm
Forum: ESP8266 boards
Topic: TMP100 library - Please critique
Replies: 10
Views: 3661

Re: TMP100 library - Please critique

How about def read_temp(self): t = self.read_register(self.T_REG) return 0.00390625 * ustruct.unpack('>h', t)[0] @jimako the point being that ustruct performs the sign handling on a 16 bit quantity before it is reduced to 12 bits. Although the reduction to 12 bits is not explicit: it's subsumed int...