These are chat archives for esp8266/Arduino

12th
Jul 2016
Mehrdad K
@mkeyno
Jul 12 2016 05:48
@me-no-dev why would be probably reasons , reading the same size file from same directory took different time
Read File "1.bin",  File size is 86400 Bytes
...................... Reading took 102 ms

Read File "2.bin",  File size is 86400 Bytes
...................... Reading took 323 ms

Read File "3.bin",  File size is 86400 Bytes
...................... Reading took 60 ms
I might add, double the cup clock just decrease time about 30%
Me No Dev
@me-no-dev
Jul 12 2016 09:05
@mkeyno you have a single processor, you can do one thing at a time, when the network is busy, the rest of the code is not running
Mehrdad K
@mkeyno
Jul 12 2016 09:08
so it is due to only hardware ? can I interfere and choose what task shroud CPU perfrom
is there any way I could faster the reading , for example put the reading function in ICASH ROM memory
Me No Dev
@me-no-dev
Jul 12 2016 09:12
turn off wifi
Mehrdad K
@mkeyno
Jul 12 2016 09:12
just Wifi.mode(WIFI_OFF)
Me No Dev
@me-no-dev
Jul 12 2016 09:13
yes
but then if you turn off wifi, why even bother using esp?
Mehrdad K
@mkeyno
Jul 12 2016 09:14
in loop when send the start show flag by websocket , then turn the wifi off
but before that I can use benefit of webserver and websocket
any way , as you suggestion to replace the esp , can I use STM32F103C8T6 slave to ESP
Mehrdad K
@mkeyno
Jul 12 2016 09:25
@me-no-dev same result , I put the WiFi.disconnect(); WiFi.mode(WIFI_OFF); delay(1000); in setup and read the files but same exact result
Me No Dev
@me-no-dev
Jul 12 2016 09:26
then maybe those files are fragmented differently and are far appart on the flash
Mehrdad K
@mkeyno
Jul 12 2016 09:27
how to put the files together ? with erase the flash and upload again
if define function with ICACHE_RAM_ATTR or some other place can I get faster timing
Me No Dev
@me-no-dev
Jul 12 2016 09:33
not much if you function calls other functions on the flash
Holger Lembke
@holgerlembke
Jul 12 2016 10:38
Moin Moin.
Is ICACHE_FLASH_ATTR still working? (just asking...)
Me No Dev
@me-no-dev
Jul 12 2016 10:44
it is working :D
but by default all goes there anyway
Holger Lembke
@holgerlembke
Jul 12 2016 10:44
Ok.
I just again failed because the forward generation of Arduino is so broken.
String ICACHE_FLASH_ATTR ConfigWifiLoad(String WIFIssid) does not generate a forward and I was looking for some sort of smart solution.
(if any)
Me No Dev
@me-no-dev
Jul 12 2016 10:46
remove ICACHE_FLASH_ATTR or put it at the end?
String ConfigWifiLoad(String WIFIssid) ICACHE_FLASH_ATTR;
Holger Lembke
@holgerlembke
Jul 12 2016 10:47
removing works, because it is default.... that putting at the end also works is new to me.
Me No Dev
@me-no-dev
Jul 12 2016 10:48
if you look at what it expands to, you'll figure it out :)
Holger Lembke
@holgerlembke
Jul 12 2016 10:48
how to look at it?
(some days ago I asked about the code the compiler generates and there was no answer.... still not found it)
Holger Lembke
@holgerlembke
Jul 12 2016 10:54
thanks.
sticilface
@sticilface
Jul 12 2016 11:19
does anyone have any ideas about this... i've found that on my mac, using hostname.local to resolve the IP of the ESP takes a while. several seconds. whilst using the IP directly is instantaneous. the reason is that the mac is using ip6 name resolution first and waiting for that. if i use -4 and force ip4 with curl it is instantaneous. i've noticed this on the iPhone too. is there any way around this that might fix it for everything? i've read that many mac things like airplay require ip6 so a global disabling of it is not really an option. Has anyone else noticed a similar thing?
Holger Lembke
@holgerlembke
Jul 12 2016 11:25
sounds like a contradiction.
sticilface
@sticilface
Jul 12 2016 11:33
perhaps. has anyone else noticed this as well?
what about trying ip4 first instead?
Holger Lembke
@holgerlembke
Jul 12 2016 11:35
that would disable ip6....
Holger Lembke
@holgerlembke
Jul 12 2016 11:46
did you try adding the ip4-adress in ip6-notation?
Mehrdad K
@mkeyno
Jul 12 2016 14:02
@me-no-dev I think I should waiting fro cumming soon ESP32 ,
Jonathan
@JonniG
Jul 12 2016 14:11
I'm trying to use 2 i2c devices on an ESP8266. an OLED display and a BH1750fvi light sensor. I can get both to work separately but the light sensor outputs "54216" when the OLED is in use as well. Anyone have experience with the BH1750fvi?
Apologies if this is not the place to ask
Emogg
@emogg
Jul 12 2016 15:00
/
Set the address for this sensor
you can use 2 different address
Device_Address_H "0x5C"
Device_Address_L "0x23"
you must connect Addr pin as required
/
LightSensor.SetAddress(Device_Address_L);
Holger Lembke
@holgerlembke
Jul 12 2016 15:34
WIFI_OFF is not highlighted....
Holger Lembke
@holgerlembke
Jul 12 2016 18:43
I try to play around with WPS... how do I switch between different WPS- and Accesspoint- configurations?
Clemens Kirchgatterer
@everslick
Jul 12 2016 19:12
do you need something like WiFiMulti ?
Holger Lembke
@holgerlembke
Jul 12 2016 19:36
I'm currently building (again) a "save wifi config to file and reconnect, if you see the AP" and thought about addig WPS for easier config.
And after looking into a WPS example I didn't see a way how to configure WPS data.... how to delete or choose a wps, for example.
Holger Lembke
@holgerlembke
Jul 12 2016 20:24
Hmmm. After reading some Expressif pdfs it doesnt look like WPS can do what I want....
Sergey Anisimov
@anisimovsergey
Jul 12 2016 21:58
Hi All, it's very cool that now I can use std::function... for subscribing for events from ESP8266WiFiGenericClass but what I really missing though is the same option for ESP8266WiFiScanClass when I'm using it in async mode. Let's say something like onScanDone(std::function...).
Initially my intent was to implement in my own code all this stuff but then I though it might be useful for many people especially if they are using ESPAsyncWebServer