Search found 454 matches

by devnull
Mon Apr 10, 2017 12:53 pm
Forum: ESP8266 boards
Topic: RTC Calibration
Replies: 7
Views: 3837

Re: RTC Calibration

Here are some test results, both tests were done on the same device within a minute of each other: ESP8255 >>> ds3231.cal(mins=1,samples=10) mins: 1 samples: 10 rtccal: 1.03067 index: 0 data: 1.189803 avg: 1.189803 index: 1 data: 1.191065 avg: 1.190434 index: 2 data: 1.082704 avg: 1.154523 index: 3 ...
by devnull
Mon Apr 10, 2017 9:49 am
Forum: ESP8266 boards
Topic: Flashing the D1 Mini Lite
Replies: 12
Views: 5980

Re: Flashing the D1 Mini Lite

Well I have found how to hack / fix this, but are not sure why it is needed: ### pyboard.py def enter_raw_repl(self): self.serial.write(b'\r\x03\x03') # ctrl-C twice: interrupt any running program # flush input (without relying on serial.flushInput()) n = self.serial.inWaiting() while n > 0: self.se...
by devnull
Mon Apr 10, 2017 6:24 am
Forum: ESP8266 boards
Topic: Flashing the D1 Mini Lite
Replies: 12
Views: 5980

Re: Flashing the D1 Mini Lite

Ctrl-A A should send Ctrl-A to the device. Ahh, yes that works, never needed to do that before. That works on both the new wee-mos device and a esp-12/8266 device, but after closing the screen and running the ampy command to list the files, on the wee-mos I get the raw repl error and on the ESP-12S...
by devnull
Mon Apr 10, 2017 6:04 am
Forum: ESP8266 boards
Topic: Flashing the D1 Mini Lite
Replies: 12
Views: 5980

Re: Flashing the D1 Mini Lite

Sorrie, I have never attempted (never needed to) use RAW REPL before, I understand it is REPL without echo ? I am using OSX, when in the REPL, If I type CTRL-A and then type any letter, the console immediately errors with: No Other Window My intention was to print('hello') in RAW mode, but that thro...
by devnull
Mon Apr 10, 2017 5:42 am
Forum: ESP8266 boards
Topic: Flashing the D1 Mini Lite
Replies: 12
Views: 5980

Re: Flashing the D1 Mini Lite

@roberthh - I can upload and download files using web-repl but not via the usb console. os.listdir() does list the files and I have even re-formatted and tried again and the result is the same. I can access other esp8266 devices from the same console using ampy, rshell, mpfshell, but not the mini li...
by devnull
Mon Apr 10, 2017 2:36 am
Forum: ESP8266 boards
Topic: Flashing the D1 Mini Lite
Replies: 12
Views: 5980

Re: Flashing the D1 Mini Lite

Just received a batch of these and can confirm that the flashing was a breeze. esptool.py --port /dev/tty.wchusbserialfa120 --baud 115200 write_flash --flash_mode=dout --flash_size=detect 0 esp8266-20170108-v1.8.7.bin I can login to the REPL via usb, but are unable to access the file system via RAW ...
by devnull
Sun Apr 09, 2017 11:11 am
Forum: ESP8266 boards
Topic: RTC Calibration
Replies: 7
Views: 3837

Re: RTC Calibration

Thanks for the suggestions and for the testing on the RTC stability. I created a little PCB breakout for the DS1307 and associated components and managed to convert the code to work on ESP8266, however instead of using PPM I am using a multiplier factor that is used to multiply the rtc alarm time. A...
by devnull
Sat Apr 08, 2017 1:41 am
Forum: General Discussion and Questions
Topic: I2C readfrom_mem - can't convert bytearray to int
Replies: 4
Views: 1998

Re: I2C readfrom_mem - can't convert bytearray to int

Code: Select all

readfrom_mem(addr, memaddr, nbytes, *, addrsize=8)
I think the 3rd param (nbytes) is number of bytes, but I am now looking at readfrom_mem_into() which does support a bytearray()
by devnull
Sat Apr 08, 2017 1:24 am
Forum: General Discussion and Questions
Topic: I2C readfrom_mem - can't convert bytearray to int
Replies: 4
Views: 1998

Re: I2C readfrom_mem - can't convert bytearray to int

Thanks dave, but that link is for pyboard mem_read() and I am using the standard readfrom_mem() on esp8266 device.
by devnull
Sat Apr 08, 2017 12:33 am
Forum: General Discussion and Questions
Topic: I2C readfrom_mem - can't convert bytearray to int
Replies: 4
Views: 1998

I2C readfrom_mem - can't convert bytearray to int

I seem to be unable to get past this error: import machine as mc import ustruct timebuf = bytearray(7) i2c = mc.I2C(scl=mc.Pin(5), sda=mc.Pin(4), freq=100000) ustruct.unpack("<h", i2c.readfrom_mem(104,timebuf,0))[0] >> TypeError: can't convert bytearray to int Any idea why ustruct is unable to conve...