Search found 440 matches

by devnull
Wed Mar 15, 2017 11:08 am
Forum: ESP32 boards
Topic: free file space on esp-32 wroom
Replies: 1
Views: 1375

free file space on esp-32 wroom

I thought that I had this cracked, based on the calcs in this thread: https://forum.micropython.org/viewtopic.php?t=2778 But the value of 0.046875 MB free space just can't be correct ?? def dfree(): bits = statvfs('/flash') print(bits) blksize = bits[0] # 4096 blkfree = bits[3] # 12 freesize = blksi...
by devnull
Tue Mar 14, 2017 1:56 pm
Forum: ESP8266 boards
Topic: ESP-12 RTC Accuracy
Replies: 6
Views: 2337

Re: ESP-12 RTC Accuracy

Peter - thanks, but after reading through that it appears that the issue was fixed ??

https://github.com/micropython/micropython/pull/2726
by devnull
Mon Mar 13, 2017 11:42 pm
Forum: ESP8266 boards
Topic: ESP-12 RTC Accuracy
Replies: 6
Views: 2337

ESP-12 RTC Accuracy

I am using the in-built RTC on the 8266 to deepsleep for an hour, but it seems to be highly inaccurate, although it's repeatability seems to be OK. secs = 3600 rtc = mc.RTC() rtc.irq(trigger=rtc.ALARM0, wake=mc.DEEPSLEEP) rtc.alarm(rtc.ALARM0, (secs*1000)) In sleeping for 1 hour, it wakes up on aver...
by devnull
Sat Mar 11, 2017 10:00 am
Forum: ESP8266 boards
Topic: Unable to use DHT on pins 4, 5 & 15
Replies: 1
Views: 1146

Re: Unable to use DHT on pins 4, 5 & 15

OK, just found the cause, there's no on-board pullup so you need to use the soft pullups:

Code: Select all

DHT22(machine.Pin(5,machine.Pin.IN, machine.Pin.PULL_UP))
by devnull
Sat Mar 11, 2017 9:22 am
Forum: ESP8266 boards
Topic: Unable to use DHT on pins 4, 5 & 15
Replies: 1
Views: 1146

Unable to use DHT on pins 4, 5 & 15

Device is ESP-12F (8266). I am unable to read DHT sensor on PIN 4 & 5, it works OK on pin 0. I have tested pins 4 & 5 as an input buy pulling high and reading value and as an output by connecting a LED, both work fine and as expected There is nothing else connected to pins 4 & 5, attempting to measu...
by devnull
Wed Mar 08, 2017 10:29 am
Forum: ESP32 boards
Topic: Esp32 port
Replies: 35
Views: 16483

Re: Esp32 port

@Roberthh - thanks for sharing your tools, I have tried the ftp server, and although I have files / folders on the device, the ftp server does not appear to list them. I can see the command executed on the device, but no files ! >>> from apps import uftpserver Command=USER, Payload=anonymous, Path=/...
by devnull
Tue Mar 07, 2017 2:48 am
Forum: General Discussion and Questions
Topic: global variables across all modules
Replies: 8
Views: 3668

Re: global variables across all modules

@deshipu - Thanks, that works very well.

I did not know that if you modified variables in a imported module, that it would retain those values when imported into another.
by devnull
Mon Mar 06, 2017 12:52 pm
Forum: General Discussion and Questions
Topic: global variables across all modules
Replies: 8
Views: 3668

Re: global variables across all modules

Thanks so much for helping, but wouldn't that require me to write a global module file on every boot / wakeup, I would prefer not to do that.

It would be far easier to just read it once and make it available in memory ??
by devnull
Mon Mar 06, 2017 12:22 pm
Forum: General Discussion and Questions
Topic: global variables across all modules
Replies: 8
Views: 3668

Re: global variables across all modules

During bootup I read the vcc level, and also detect the boot mode, either setup or run, this mode is changed by a long / short press on a button as well as reading a .json file 'mode' variable. which is set using a mqtt subscription During bootup I also read a json file that contains the wlan connec...
by devnull
Mon Mar 06, 2017 11:48 am
Forum: General Discussion and Questions
Topic: global variables across all modules
Replies: 8
Views: 3668

global variables across all modules

I would like to have 3 or 4 read-only global variables that are set during the boot up sequence to be made available in every module without needing an additional import, i.e truly global variables. I thought that I could do this by adding them to the __builtins__ however this does not appear to be ...