These are chat archives for esp8266/Arduino

24th
Jan 2016
Aditya Tannu
@AdySan
Jan 24 2016 07:24
Has anyone tested the FSBrowser example lately? Last time I tried a few months ago it was very stable, but with latest git, rarely loads page, doesn't always disconnect of closing browser, cannot reconnect from a browser, mDNS wont work, have to access server by IP, what am I doing wrong? @me-no-dev
Aditya Tannu
@AdySan
Jan 24 2016 07:45
Everything works a couple of times, but if you leave the sketch idle for a few mins, nothing responds. Also I can very rarely load a page from an iOS device.
Me No Dev
@me-no-dev
Jan 24 2016 08:18
No clue @AdySan but can say that some changes went into the WebServer (I have no clue what though) and maybe those or something else.
Me No Dev
@me-no-dev
Jan 24 2016 08:30
@AdySan have you tried the Async Server?
brutzler
@brutzler
Jan 24 2016 09:11
Hi,
has anybody experience with battery-powered ESP?
Want to make a movable temp-transmitter with an ESP and a DS18B20. Thought to power it with 2 Mignon (AA) batteries. How long do you think will the batterie hold on for this?
I want to transmit the actual temp every 1 min (or even less) to my emoncms-server. Can I power down the WiFi for the rest of the time to save power? Or do some other tricks?
Me No Dev
@me-no-dev
Jan 24 2016 09:12
as a matter of fact you shoudl if you want any real life from the batteries
maye even go at 2-5 minutes per measurement
Markus
@Links2004
Jan 24 2016 09:13
deepsleep will help be better as only disable wifi ~20mA vs some uA
Me No Dev
@me-no-dev
Jan 24 2016 09:14
see where is the option to not go through all calibrations for the wifi and you should start under 100ms
Markus
@Links2004
Jan 24 2016 09:14
and may only transmit the new value if its really changed
brutzler
@brutzler
Jan 24 2016 09:16
never did anything with deepsleep. who will wake up the esp in that case?
Is there some faq /doc/example for this function?
@Links2004 this 20mA is for what state? with WiFi?
Markus
@Links2004
Jan 24 2016 09:17
without Wifi but "CPU" full running, with wifi are ~65mA
but up to 250mA
Me No Dev
@me-no-dev
Jan 24 2016 09:18
@brutzler hook up pin 16 to ch_pd and ESP.deepSleep(time)
Markus
@Links2004
Jan 24 2016 09:18
deepsleep can be waked by the rtc
brutzler
@brutzler
Jan 24 2016 09:18
when i calculate a power consumption of 20mA then a normal AA with 2000mAh will last ~100h.
Markus
@Links2004
Jan 24 2016 09:18
yes that why using deepsleep then its some uA :)
brutzler
@brutzler
Jan 24 2016 09:19
@Links2004; rtc: internal or do I have to assemble an external
Markus
@Links2004
Jan 24 2016 09:19
internal, GPIO16 is controlled by the RTC, connect it like @me-no-dev says.
Mario Mikočević
@mozgy
Jan 24 2016 09:21
meunin'
@brutzler I run ESP w/ ds18b20 on LiFePO4 batts
ystrem
@ystrem
Jan 24 2016 09:22
hi
anybody using platformio on W10 ?
brutzler
@brutzler
Jan 24 2016 09:22
@mozgy : what ESP do you use, lifetime of bat?
Mario Mikočević
@mozgy
Jan 24 2016 09:23
both esp-01 and esp-12
Me No Dev
@me-no-dev
Jan 24 2016 09:23
@mozgy I would love to have me some of your batteries
Mario Mikočević
@mozgy
Jan 24 2016 09:23
@me-no-dev ebay :)
Me No Dev
@me-no-dev
Jan 24 2016 09:23
@mozgy what do you cahrge them with?
I have RC chargers that will do but are big and bulky
and charging with RC charger
brutzler
@brutzler
Jan 24 2016 09:25
connect GPIO16 to CH_PD?? What GPIO is CH_PD?
Me No Dev
@me-no-dev
Jan 24 2016 09:25
not the RST but maybe marked with EN
@brutzler what module are you hooking?
brutzler
@brutzler
Jan 24 2016 09:26
gitter.jpg
this way?
Me No Dev
@me-no-dev
Jan 24 2016 09:26
yup
Mario Mikočević
@mozgy
Jan 24 2016 09:27
there is even text "WAKE" :)
brutzler
@brutzler
Jan 24 2016 09:27
think later on I will use a smaller ESP.
Me No Dev
@me-no-dev
Jan 24 2016 09:28
third pin on the left side from the antenna
Mario Mikočević
@mozgy
Jan 24 2016 09:28
but but but
Me No Dev
@me-no-dev
Jan 24 2016 09:28
it's marked either CH_PD or EN
Mario Mikočević
@mozgy
Jan 24 2016 09:28
I'm connecting GPIO16 to RST for deep_sleep wakeup
Me No Dev
@me-no-dev
Jan 24 2016 09:28
was it?
i think both can wake it up
and you should hook it to the one that does not have reset button
so you can distinguish what woke it up
Mario Mikočević
@mozgy
Jan 24 2016 09:32
hmm, interesting info
brutzler
@brutzler
Jan 24 2016 09:40
is this wakeup like a reset? what code will be executed after wakeup. Will he start at the beginning of the program? with void setup()?
Mario Mikočević
@mozgy
Jan 24 2016 09:41
yup, like you turned it on for the first time
Me No Dev
@me-no-dev
Jan 24 2016 09:49
extern "C" {
  struct rst_info{
    uint32 reason;
    uint32 exccause;
    uint32 epc1;
    uint32 epc2;
    uint32 epc3;
    uint32 excvaddr;
    uint32 depc;
  };

  extern struct rst_info resetInfo;
}

void setup() {
  Serial.begin(115200);
  //Serial.setDebugOutput(true);
  Serial.println("\nBooting");
  Serial.printf("Reset[%u]: %s\n", resetInfo.reason, (
    resetInfo.reason == 0 ? "DEFAULT" : 
    resetInfo.reason == 1 ? "WDT" : 
    resetInfo.reason == 2 ? "EXCEPTION" : 
    resetInfo.reason == 3 ? "SOFT_WDT" : 
    resetInfo.reason == 4 ? "SOFT_RESTART" : 
    resetInfo.reason == 5 ? "DEEP_SLEEP_AWAKE" : 
    resetInfo.reason == 6 ? "EXT_SYS_RST" : "UNKNOWN"));

  ESP.deepSleep((10 * 1000000), WAKE_NO_RFCAL);
}
and @mozgy you were correct ;) pin 16 to RST
Mario Mikočević
@mozgy
Jan 24 2016 09:51
oh nice code, stealing it right now ..
Markus
@Links2004
Jan 24 2016 09:51
Serial.println(ESP.getResetInfo()); or ESP.getResetInfoPtr();no need for extern
Me No Dev
@me-no-dev
Jan 24 2016 09:51
sure... probablyold code
Mario Mikočević
@mozgy
Jan 24 2016 09:51
even better :D
brutzler
@brutzler
Jan 24 2016 09:51
this means !EN but RST
Me No Dev
@me-no-dev
Jan 24 2016 09:51
yes
brutzler
@brutzler
Jan 24 2016 09:53
ok guys. thx for infos. some work for this cold winter-day
brutzler
@brutzler
Jan 24 2016 12:38

made some tests with the deepsleep:
Using the ESP.getResetInfo() gives me back a:
Fatal exception:0 flag:6 (EXT_SYS_RST) epc1:0x00000000 epc2:0x00000000 epc3:0x00000000 excvaddr:0x00000000 depc:0x00000000
Good?

ESP.deepSleep((10 * 1000000), WAKE_NO_RFCAL);

this line should be the last in my program, or? after this the ESP is going to sleep and does not execute any program? right?

brutzler
@brutzler
Jan 24 2016 12:47
not my day: next problem....
Serial.printf( "Vcc: %u\n", ESP.getVcc() ); gives me always a 65535 back
Using a NodeMCU V 1.0 without any connection (besides the GPIO16<->RST). powered over USB
brutzler
@brutzler
Jan 24 2016 12:52
ahhh forgot the ADC_MODE(ADC_VCC); :-(
ystrem
@ystrem
Jan 24 2016 13:28
I had the same problem
but it's not a problem :D
ystrem
@ystrem
Jan 24 2016 13:52
ohh sry I got this one
Fatal exception:0 flag:5 (DEEP_SLEEP_AWAKE) epc1:0x00000000 epc2:0x00000000 epc3:0x00000000 excvaddr:0x00000000 depc:0x00000000
Markus
@Links2004
Jan 24 2016 13:57
flag:6 (EXT_SYS_RST) is RST pin, flag:5 (DEEP_SLEEP_AWAKE) is CH_PD/EN
ystrem
@ystrem
Jan 24 2016 14:04
I have connected GPIO16 -> RST
and I have this (DEEP_SLEEP_AWAKE)
Mario Mikočević
@mozgy
Jan 24 2016 14:05
@ystrem on NodeMCU 1st one is EXT_SYS_RST, all regular next are DEEP_SLEEP_AWAKE
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:29
has anyone tried using an arduino uno LCD shield and library with the ESP?
Helio Machado
@crushedice2000
Jan 24 2016 14:31
This message was deleted
@skorokithakis: i2c or 8bit?
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:32
good question, i think it's 8-bit
uses the arduino LiquidCrystal lib
Helio Machado
@crushedice2000
Jan 24 2016 14:36
@skorokithakis: 4bit standalone. What problem do you have?
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:36
i'm just wondering whether i can use it at all, it says it's not compatible with 3V
Helio Machado
@crushedice2000
Jan 24 2016 14:37
@skorokithakis: I think that the only difficult thing that may not work is the backlight. Does it (the LCD, not the backlight) power up with 3V3?
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:37
i'll try it and see, i can use a nodemcu and power it up with the 5v rail
just the data needs to work with 3v3
Helio Machado
@crushedice2000
Jan 24 2016 14:38
@skorokithakis: Should work (untested). Use 5V for VCC and 3V3 for data.
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:38
cool, thanks
Helio Machado
@crushedice2000
Jan 24 2016 14:41
@skorokithakis : The ESPish way of connecting it (I think so) would be with a separate 5V rail and something like this to use the less gpios possible. However it won't work with the standard LiquidCrystal library.
brutzler
@brutzler
Jan 24 2016 14:43

@mozgy

on NodeMCU 1st one is EXT_SYS_RST, all regular next are DEEP_SLEEP_AWAKE

I get always a EXT_SYS_RST on wakeup

Mario Mikočević
@mozgy
Jan 24 2016 14:45
@brutzler I tested it on my Amica NodeMCU ..
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:47
hmm, i'm running an amica nodemcu and it seems to be resetting every so often lately
has anyone else seen this?
Chris Elsworth
@celsworth
Jan 24 2016 14:48
checked your power?
Mario Mikočević
@mozgy
Jan 24 2016 14:49
connected only D0 to RST and it works
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:50
@celsworth what should i check for? it's a 1A USB charger/power adapter, should be good
Chris Elsworth
@celsworth
Jan 24 2016 14:50
put your scope across it and see if you spot any voltage drops
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:51
i don't have an analog scope :/
Chris Elsworth
@celsworth
Jan 24 2016 14:51
:(
tricky then. could just try adding a large cap to see if that solves it?
a 3300uF cap or so fixes a lot of esp problems ime ;)
Mario Mikočević
@mozgy
Jan 24 2016 14:51
3300 ? huh
I'm using 330 :)
Chris Elsworth
@celsworth
Jan 24 2016 14:52
caps are cheap, shrug
3300 will do anything 330 can ;)
Mario Mikočević
@mozgy
Jan 24 2016 14:52
3.3mF is BIG
Chris Elsworth
@celsworth
Jan 24 2016 14:52
yep :)
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:53
can do, i'll try a 470, thanks
Mario Mikočević
@mozgy
Jan 24 2016 14:53
sometimes that is not so good :)
Chris Elsworth
@celsworth
Jan 24 2016 14:53
esp is one thirsty little beast
Mario Mikočević
@mozgy
Jan 24 2016 14:54
that's true
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:55
added
looks like the second iteration of this PCB should include a capacitor and some mosfets
Chris Elsworth
@celsworth
Jan 24 2016 14:56
well.. are you designing a breakout or a dev board? :)
it sounds to me like you started wiht a breakout but you're rapidly moving towards becoming a dev board ;)
Stavros Korokithakis
@skorokithakis
Jan 24 2016 14:57
Chris Elsworth
@celsworth
Jan 24 2016 14:57
next you'll be adding leds to the gpios and light sensors ;)
Stavros Korokithakis
@skorokithakis
Jan 24 2016 15:00
what, to the breakout? no, that's pretty much complete, i think :smile:
does anyone know what these capacitor footprint letters mean? D5-L11-P2.5
brutzler
@brutzler
Jan 24 2016 15:24
@mozgy: what about the link?
Mario Mikočević
@mozgy
Jan 24 2016 15:28
nothing special, just another version of 4AA box
Chris Elsworth
@celsworth
Jan 24 2016 15:29
4AA? for an esp? rather use 1x lithium :D
AAs are bulky when they only put out 1.5v :(
Mario Mikočević
@mozgy
Jan 24 2016 15:29
he said he wants a box for everything, with switch too
Chris Elsworth
@celsworth
Jan 24 2016 15:29
I see
brutzler
@brutzler
Jan 24 2016 15:32
Yes. 2xAA and the other place for the ESP...
@mozgy thx for the link. will buy in germany. Need it urgent...
Mario Mikočević
@mozgy
Jan 24 2016 15:33
yw
brutzler
@brutzler
Jan 24 2016 15:37
do you think that I need more power, if I use a nodemcu and not a bare ESP? would be easier to program, and i have some lying around.
Only think, because of the additional components (FTDI-chip and the other chicken-food)
Chris Elsworth
@celsworth
Jan 24 2016 15:38
the additional stuff takes a few extra mA, so not really
the power consumption of the ftdi is lost in the noise when you put it next to the power consumption of an esp :)
brutzler
@brutzler
Jan 24 2016 15:41
hmmm... the FTDI is imho powered with 5V. If I only power the ESP with 3V, then I think the ftdi is not online
Chris Elsworth
@celsworth
Jan 24 2016 15:41
possibly, would need to check schematic
might depend on the voltage regulator, does let power through "backwards"
some of them don't like it very much
brutzler
@brutzler
Jan 24 2016 15:46
checked some schematic. there is one (V0.9) with a ch3400. This USB2UART is powered with 5V..
another schematic with CP2102: USB2UART is powered wit 3V3. This board I wanted to use.
will have to find out if the "NCP1117ST33T3G" is complaining ...
Markus
@Links2004
Jan 24 2016 15:53
for battery device better use bare module or one where you can separate the ESP from serial + LDO
Narongrat Srimee
@narongrat
Jan 24 2016 16:58
Hi, I would like to ask if we need to add my/our new hardware board to the board manager list.
How I can do this? Do I contact to anyone?
Aditya Tannu
@AdySan
Jan 24 2016 17:15
@brutzler I got that too for battery projects but as @tzapu correctly pointed out it uses a LM1117, which has a very high quiescent current. Porbably wont get the best battery life.
@narongrat take a look at this PR esp8266/Arduino#1022
Chris Elsworth
@celsworth
Jan 24 2016 17:21
I don't think you can beat MCP1702 for battery projects :)
its like.. micro-amps Qc
of course ideally you'd need no regulator at all
Mario Mikočević
@mozgy
Jan 24 2016 17:22
@celsworth I cannot purchase those cheap
Chris Elsworth
@celsworth
Jan 24 2016 17:22
oh :(
Mario Mikočević
@mozgy
Jan 24 2016 17:23
darned country I live in ..
Narongrat Srimee
@narongrat
Jan 24 2016 17:24
@AdySan Thank you
Mario Mikočević
@mozgy
Jan 24 2016 17:28
hmmm, interesting - Serial.printf( "Boot Vers: %u\n", ESP.getBootVersion() ); ->
on an old ESP-12 I get Boot Vers: 2 and on latest ESP-12E (or Q) I get Boot Vers: 31
should I upgrade old one and how do I do that ? (ESP Flasher?)
ah nice, following arduino ide upload did that
Chris Elsworth
@celsworth
Jan 24 2016 17:33
heh, never seen that before
what does boot version refer to
Mario Mikočević
@mozgy
Jan 24 2016 17:33
bootloader me thinks
Chris Elsworth
@celsworth
Jan 24 2016 17:34
makes sense
the sdk docs are useless as always
although they do have one useful note about system_restart_enhance
whatever that means :)
factory test binary, wonder what that does :)
Helio Machado
@crushedice2000
Jan 24 2016 18:00
@/all: These days I've received three LoLin (lolín) NodeMCU. They fill all the protoboard holes. Is there any workaround?
Markus
@Links2004
Jan 24 2016 18:10
getBootVersion has no real meaning for use, since we not use the bootloader from espressif
we have eboot
Mario Mikočević
@mozgy
Jan 24 2016 18:12
@Links2004 I have problem with that ESP now, it normaly boots after flash but on deep_sleep wake I get ets Jan 8 2013,rst cause:5, boot mode:(3,6) ets_main.c
it worked fine before I reflashed it with new sketch
Chris Elsworth
@celsworth
Jan 24 2016 18:21
@crushedice2000 yes, next time order the thinner ones ;)
you could put two breadboards side by side though
one row of pins in each board
I made the same mistake, my very first esp board was also a fat nodemcu. didn't make that mistake again!
Helio Machado
@crushedice2000
Jan 24 2016 18:26
@celsworth: Now I have three :( My famous burned NodeMCU (now a ESP-01 programmer) was a thin one (Amica). The trick of joining two boards seems great. Thanks!
Also, I bought two motor shields for NodeMCU and the female pins are for the thin one :(
Mario Mikočević
@mozgy
Jan 24 2016 18:28
motor shield is for DoIt version of NodeMCU
Helio Machado
@crushedice2000
Jan 24 2016 18:29
@mozgy: What is the difference between Amica and DoIt boards?
Mario Mikočević
@mozgy
Jan 24 2016 19:45
rc2 is up :)
Helio Machado
@crushedice2000
Jan 24 2016 19:46
@mozgy: Where is the changelog?
Mario Mikočević
@mozgy
Jan 24 2016 19:51
@crushedice2000 esp8266/Arduino@5211250
Aditya Tannu
@AdySan
Jan 24 2016 19:52
there's also a github pages site for releases, always forget to bookmark the link
Helio Machado
@crushedice2000
Jan 24 2016 19:54
@mozgy: Great!
Martin Ayotte
@martinayotte
Jan 24 2016 20:09
Looking at the CHANGELOG, for those who use DS18B20, beware, the OneWire is removed from ESP since the required changes are now merge in the original Arduino lib
Michael Miller
@Makuna
Jan 24 2016 20:10
@martinayotte what? What original Arduino lib? Wire?
There is a minor difference though. The version we had in our git enabled pullup on data pin, while the official version does not.
Martin Ayotte
@martinayotte
Jan 24 2016 20:13
Probably, but I don't see the merge. So, maybe it is a good idea to keep the ESP one until things are known.
@igrr , so, if it is only about pullup, we should care much, because it is better to use external strong one instead of realying one the poor/weak internal one
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:32
@celsworth woo, my microchip samples arrived
although this temperature sensor is stupidly small
no way i can solder this
Chris Elsworth
@celsworth
Jan 24 2016 20:33
nice!
what sensor is that?
you probably need hot air if its smaller than about 1mm pin pitch?
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:34
mcp9805-be/st
Chris Elsworth
@celsworth
Jan 24 2016 20:34
I've done 1mm wiht an iron before and I wouldn't want to try any smaller, it was hard enough
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:35
0.5mm pitch :P
Chris Elsworth
@celsworth
Jan 24 2016 20:36
it might be doable onto a board with some good soldermask
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:36
i think it would, but i'd have to solder it to some wires for prototyping first
Chris Elsworth
@celsworth
Jan 24 2016 20:36
then the mask does a lot of work for you, you just have to be careful not to get too much solder on that you make bridges
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:36
i.e. never gonna happen :P
yep
Chris Elsworth
@celsworth
Jan 24 2016 20:37
for prototyping you need some breakouts, hang on I'll get a link
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:37
i got some SOT89 breakouts i think
or SOT23/SOT89
but yeah, i need some for this as well
there are QLFP ones too
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:38
oh that's nice
Chris Elsworth
@celsworth
Jan 24 2016 20:38
those are double sided so they work for different sized chips :)
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:40
yeah, same as my SOTwhatever breakouts I got, although i think those were $3 for 10 or something
Mario Mikočević
@mozgy
Jan 24 2016 20:40
@martinayotte @igrr ds18b20 works with latest git without any problems (git pulled today around 11h)
Chris Elsworth
@celsworth
Jan 24 2016 20:40
hehe same ones I have :D
they are good
cheap but good
Mario Mikočević
@mozgy
Jan 24 2016 20:43
I have set of 7 tweezers .. needed them for RC ..
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:43
@mozgy why did you need 7?
Mario Mikočević
@mozgy
Jan 24 2016 20:44
it was set :)
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:44
oh
i don't really know why they come in more than 1
i would imagine one would be enough, maybe two tops
Michael Miller
@Makuna
Jan 24 2016 20:47
your use the same tweezers for the lead solder as you do for your unleaded solder! Oh My G!
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:49
?
what does solder have to do with it?
Michael Miller
@Makuna
Jan 24 2016 20:49
(JK)
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:49
do you get solder on the tweezers? :smile:
Michael Miller
@Makuna
Jan 24 2016 20:50
nothing
when I solder, I get solder on everything.
Stavros Korokithakis
@skorokithakis
Jan 24 2016 20:50
haha
nice
Mario Mikočević
@mozgy
Jan 24 2016 20:51
@Makuna even on glasses ? :D
Michael Miller
@Makuna
Jan 24 2016 20:51
No, I don't wear glasses, so I get it on my EYEBALLS!
Wearing glasses would be good thing, then I would be able to see what I am doing, mmm.
Quick question, with Wire, can you define any pins? Or does it have to be a specific set of Pins?
Chris Elsworth
@celsworth
Jan 24 2016 20:59
you can set them in the Wire.begin() call
pretty sure any will work
Stavros Korokithakis
@skorokithakis
Jan 24 2016 21:02
what's Wire?
Chris Elsworth
@celsworth
Jan 24 2016 21:06
I2C
Stavros Korokithakis
@skorokithakis
Jan 24 2016 21:09
ah
Chris Elsworth
@celsworth
Jan 24 2016 21:09
aka TwoWire, I guess Wire is a remnant from the dim and distant past
Michael Miller
@Makuna
Jan 24 2016 21:10
yes, Two Wire, Wire is the Arduino Compatible layer for older libraries/code; which is what I am investigating right now.
Chris Elsworth
@celsworth
Jan 24 2016 21:11
yeah they're identical: TwoWire Wire = TwoWire();
Michael Miller
@Makuna
Jan 24 2016 21:11
there are a lot of libraries that still use it.
Chris Elsworth
@celsworth
Jan 24 2016 21:11
so Wire is just an instance of the TwoWire class
Michael Miller
@Makuna
Jan 24 2016 21:11
yes
Chris Elsworth
@celsworth
Jan 24 2016 21:12
whoever thought "Wire" was a good name :/
it could refer to literally anything you can plug into an mcu :D
Michael Miller
@Makuna
Jan 24 2016 21:12
sometimes it is best not to question "old" Arduino standards, and just live with them until they die.
I believe they meant it to have flags to support OneWire, I2C, and many other standards.
Rather than have different classes/objects.
Martin Ayotte
@martinayotte
Jan 24 2016 22:02
@mozgy , thanks for letting us know. Finally, I came up to the conclusion that only changes for ESP was the PullUp option which is useless since ESP internal pullup are too weak. A good OneWire should have 4K7 pullup, especially if the DS18B20 is remote like those one : http://www.ebay.ca/itm/1x-Waterproof-Digital-Thermal-Probe-or-Sensor-DS18B20-Length-1M-/271827869264
Frankely Rafael Diaz Checo
@frankely
Jan 24 2016 22:38
Hello guys I set up this configuration using an arduino uno, I want to know how to do the same using an Arduino Micro embedded into a breadboard
blob
Stavros Korokithakis
@skorokithakis
Jan 24 2016 22:38
what's an arduino micro?
oh
this channel is about the esp8266 arduino framework
Frankely Rafael Diaz Checo
@frankely
Jan 24 2016 22:39
oh
my bad
Stavros Korokithakis
@skorokithakis
Jan 24 2016 22:39
how do you embed an arduino micro into a breadboard?
Frankely Rafael Diaz Checo
@frankely
Jan 24 2016 22:39
well maybe embed is not the right term
just on top on the board using the pins
Stavros Korokithakis
@skorokithakis
Jan 24 2016 22:39
oh
then pretty much the same way? i think their pinouts are comparable
Martin Ayotte
@martinayotte
Jan 24 2016 22:41
There are Micro/Nano etc. I've several Nano, but they are getting into dust these days.
Stavros Korokithakis
@skorokithakis
Jan 24 2016 22:41
@martinayotte yeah, same here, i bought 5 right before i found out about the esp8266
they're disused now, i don't know what to do with them
Frankely Rafael Diaz Checo
@frankely
Jan 24 2016 22:42
lol
Martin Ayotte
@martinayotte
Jan 24 2016 22:42
I've few MapleMini too
Stavros Korokithakis
@skorokithakis
Jan 24 2016 22:55
bleh, my nodeMCU keeps restarting every so often
Chris Elsworth
@celsworth
Jan 24 2016 22:55
cap didn't fix it?
Stavros Korokithakis
@skorokithakis
Jan 24 2016 22:55
even with the 470 uF
nope
i even changed the cable
so odd
maybe i should persist the state to flash so it loads it after a reboot
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:04
what's the preferred way of persisting some information?
probably a struct
Chris Elsworth
@celsworth
Jan 24 2016 23:05
how often are you writing it?
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:05
< 10 times a day
Chris Elsworth
@celsworth
Jan 24 2016 23:05
chuck it in spiffs then :)
or eeprom, which is basically spiffs on an esp I think
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:05
SPIFFS works with the normal file-based calls?
Chris Elsworth
@celsworth
Jan 24 2016 23:05
EEPROM library uses one sector of flash located just after the SPIFFS.
can store up to 4k
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:06
eeprom looks better, i think i just want to store an int and a boolean
oh nice, thanks
Chris Elsworth
@celsworth
Jan 24 2016 23:06
yeah, you can dump your struct right in
then read it back out into an address and you've got your struct back
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:08
fantastic, thanks
the only issue is that the struct stores the number of millis() to reset at
hmm
@celsworth what if i write more often? what's the preferred way then?
Chris Elsworth
@celsworth
Jan 24 2016 23:08
flash wears out
you get anything from 10k to 100k writes on it
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:09
yeah but what's the alternative?
btw is it 10k per cell?
or total?
Chris Elsworth
@celsworth
Jan 24 2016 23:09
if you were doing it more often than that I'd probably go with an sd card or something, trivial to replace then
10k per sector
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:09
ah, true
cool
hm
i may need to use NTP so i can store absolute times
have you used it at all?
Chris Elsworth
@celsworth
Jan 24 2016 23:09
on an esp? no
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:11
looks rather straightforward, with it i can convert millis() to seconds since the epoch
and store that
should be okay
Martin Ayotte
@martinayotte
Jan 24 2016 23:11
I'm using Time library, works fine on ESP
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:12
@martinayotte oh, where's that from?
You can initialize with the value got from a NTP and the lib will keep time until next sleep
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:13
that looks great, does it automatically sync?
Martin Ayotte
@martinayotte
Jan 24 2016 23:14
No, you need some code for NTP, but quite simple
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:14
very nice
Martin Ayotte
@martinayotte
Jan 24 2016 23:14
Yes, this example is doing a NTP
This example was not there when I've download the lib several months ago.
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:17
that looks great, although it might be a little overkill for what i want to do
i just want to say "expire this at X seconds since the epoch" and store X
i can probably just use (ntpSecondsReturned + millis() / 1000) to get the current time
Chris Elsworth
@celsworth
Jan 24 2016 23:18
why + millis?
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:19
what else?
Chris Elsworth
@celsworth
Jan 24 2016 23:19
ntpSecondsReturned is the current time, surely
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:19
yes, but i'll only get that once at boot
Chris Elsworth
@celsworth
Jan 24 2016 23:19
ah
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:19
yeah
i guess bootTime = ntpSecondsReturned - millis() / 1000
so bootTime + (millis() / 1000)
Chris Elsworth
@celsworth
Jan 24 2016 23:20
yep
Aditya Tannu
@AdySan
Jan 24 2016 23:23
@skorokithakis I was referring to your commit esp8266/Arduino@1da7f91
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:23
oh, what about it?
Aditya Tannu
@AdySan
Jan 24 2016 23:23
I'm using it is a differnet context, should it go and erase the old output or just continue printing on the same line
I want Serial output to stick to the same line and update a value by redrawing on the same line
Looks like that's what youre trying to do here
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:24
oh, yeah
how can i put some code in another file and include it in my main.ino file?
put the signatures in ntp.h and #include <ntp.h>?
Aditya Tannu
@AdySan
Jan 24 2016 23:26
mine stays on the same line but doesnt erase the old line, so i get a horizontally growing output
Stavros Korokithakis
@skorokithakis
Jan 24 2016 23:26
@AdySan yeah, same as the code above
it just returns to the start
brutzler
@brutzler
Jan 24 2016 23:57
hi, just a little bit confused.
I want to send out a tcp-telegram from my ESP to a apache-server. what do I need for this?
"ESP8266WebServer server(80)" is the wrong way....or?