These are chat archives for esp8266/Arduino

8th
Dec 2015
Angus Gratton
@projectgus
Dec 08 2015 00:17
ekarlso: the -i option outputs in C array syntax
Endre Karlson
@ekarlso
Dec 08 2015 00:25
@projectgus ya I see, but the code requires uint8 not char ? :smile:
Chris Elsworth
@celsworth
Dec 08 2015 00:26
they're interchangeable
just edit it ;)
Stavros Korokithakis
@skorokithakis
Dec 08 2015 01:11
does anyone know if there's a cheaper clone of the adafruit huzzah?
Daniel Mawhirter
@danielmawhirter
Dec 08 2015 01:19
wemos d1 mini is cheap
Michael Graff
@skandragon
Dec 08 2015 03:57
@sticilface Yes I've seen that.
I now have all my lights updating in parallel, rather than one strand at at time. This brings my update time down from 250 ms per update cycle for all 306 GE-35 bulbs to a mere 29ms or so, allowing me to update them at a very reasonable rate.
girish kolte
@koltegirish
Dec 08 2015 05:37
Hello Everyone, Anybody know how to do mesh network
girish kolte
@koltegirish
Dec 08 2015 06:00
using esp8266
kathir1951
@kathir1951
Dec 08 2015 06:26
HI can any one give make file for esp8266-arduino I want to compile sketch externally
Michael Miller
@Makuna
Dec 08 2015 06:38
@skandragon the multi pin/bus led update is possible and I have a branch in my github NeoPixelBus library that implements it. I could only 3 buses updating reliably at 160mhz. Using a bit mask to set and clear gpio didn't work well as you have to read it for the pins that are not used for the bus but used for other reasons.
tzapu
@tzapu
Dec 08 2015 06:42
@Links2004 Thanks @roccomuso i maintain WiFiManager, seems to work ok for quite a few people. If anything is not working for you, please open an issue on github
beikeland
@beikeland
Dec 08 2015 10:25
Markus
@Links2004
Dec 08 2015 10:28
@brutzler you need to install the normal version of Adafruit-GFX-Library https://github.com/adafruit/Adafruit-GFX-Library
the graphicstest_esp8266 example will compile fin with the latest core.
@ekarlso for linux you can use the command xdd -i
brutzler
@brutzler
Dec 08 2015 10:35
@Links2004 latest core? = last staging? 2.0.0 rc2?
will try the lib in the evening
BTW: you told me to connect the LED-pin to 3V3. Somewhere read, it should be used a 50-60R resistor....
Markus
@Links2004
Dec 08 2015 10:36
latest core = git :) but it shut work with rc2 too its only use SPI and there is noting change.
i have connected to 3V3, the resistor will sure not harm, and may improve the lifetime of the LEDs.
Kiril Zyapkov
@kzyapkov
Dec 08 2015 10:56
Hi all! Does anyone know of a library implementation of byteswap functions? I need to convert endianness and really don't want to carry my own endian.h
kathir1951
@kathir1951
Dec 08 2015 11:00
@beikeland THANKS. BUT THERE IS NO MAKE FILE
Markus
@Links2004
Dec 08 2015 11:00

gcc has build in:

uint16_t __builtin_bswap16 (uint16_t x)
uint32_t __builtin_bswap32 (uint32_t x)
uint64_t __builtin_bswap64 (uint64_t x)

shut be there for the ESP too.

brutzler
@brutzler
Dec 08 2015 11:00
@kzyapkov using highByte(), lowByte()??
@beikeland but i am unable compile successfully
Kiril Zyapkov
@kzyapkov
Dec 08 2015 11:04
@Links2004 thanks!
though ... the builtins don't seem to work
nope, my bad. they do work :)
Ivan Grokhotkov
@igrr
Dec 08 2015 11:07
also htonl, ntohl
Rohit Yermalkar
@romuye123
Dec 08 2015 11:08
hello, i am trying the arduino ide example esp8266webserver - webupdate
the compiled file gets updated successfully
but after reboot its resets
.
.
.
.
:rch 1460, 1460
:c 1, 1460, 2920
:c0 1, 1460
:rn 316
Update Success: 259984
Rebooting...
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
what could be the issue ?
Stavros Korokithakis
@skorokithakis
Dec 08 2015 11:11
you're flashing the elf, aren't you
Rohit Yermalkar
@romuye123
Dec 08 2015 11:11
yes
Stavros Korokithakis
@skorokithakis
Dec 08 2015 11:12
you're supposed to flash the bin
i had the same problem
Rohit Yermalkar
@romuye123
Dec 08 2015 11:12
no no
i am flashing bin file only
Stavros Korokithakis
@skorokithakis
Dec 08 2015 11:12
hmm, which one?
Rohit Yermalkar
@romuye123
Dec 08 2015 11:12
i am using the IDE option
Stavros Korokithakis
@skorokithakis
Dec 08 2015 11:12
oh hm
Rohit Yermalkar
@romuye123
Dec 08 2015 11:12
export compiled library
Stavros Korokithakis
@skorokithakis
Dec 08 2015 11:12
then i don't know :(
why not flash from the IDE?
Rohit Yermalkar
@romuye123
Dec 08 2015 11:13
wanted to try Over the air
wifi
so that we dont need to connect serial all the time
Markus
@Links2004
Dec 08 2015 11:13
is the sketch running if you manually press the reset, once?
Rohit Yermalkar
@romuye123
Dec 08 2015 11:14
i dont manually press it
after updating the program itself reboots
Stavros Korokithakis
@skorokithakis
Dec 08 2015 11:14
you can use the IDE to do OTA
just select your esp in the platforms
@Links2004 means does it work after you reset?
Markus
@Links2004
Dec 08 2015 11:15
yes but there is a bug in the ESP (#1017) that the first reboot after flash by serial will fail.
all next reboot work fine.
Rohit Yermalkar
@romuye123
Dec 08 2015 11:16
i want OTA upgrade feature as well
so dont want to use IDE
Markus
@Links2004
Dec 08 2015 11:16
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
looks a lot like this bug to me.
Stavros Korokithakis
@skorokithakis
Dec 08 2015 11:16
again
the IDE does OTA
Rohit Yermalkar
@romuye123
Dec 08 2015 11:17
@Links2004 ok let me try that
Markus
@Links2004
Dec 08 2015 11:17
you can OTA without the IDE, but you need a binary to do so.
Rohit Yermalkar
@romuye123
Dec 08 2015 11:17
@Links2004 : which library ArduinoOTA ?
Markus
@Links2004
Dec 08 2015 11:17
httpUpdate work without IDE for example.
ArduinoOTA can be triggert by commend line
Rohit Yermalkar
@romuye123
Dec 08 2015 11:19
my scenario is:
1) the esp8266 is packed in a BOX for testing purpose.
2) I dont need to open the BOX to program the esp
3) I need something i will put the compiled file on http server and the esp should update itself automatically if the version available on http server is greater
Rohit Yermalkar
@romuye123
Dec 08 2015 11:21
exactly thats what i tried
so getting this crash
Update Success: 259984
Rebooting...
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
Markus
@Links2004
Dec 08 2015 11:22
and its not a "crash" the ESP has rebooted to serial bootloader mode ;)
Rohit Yermalkar
@romuye123
Dec 08 2015 11:23
oh ok my bad
:smile:
the esp needs to be in boot mode while http update or not ?
Markus
@Links2004
Dec 08 2015 11:24
no "normal" sketch running mode
Rohit Yermalkar
@romuye123
Dec 08 2015 11:24
ok, that must be my problem :)
i was still keeping in BOOT mode
Rohit Yermalkar
@romuye123
Dec 08 2015 11:37
facing some weird issue now
system param error
02 d0 2e 83 16 1d f3 32 20 22 1b 33 32 60 22 86 c9 ff 00 00 00 00 00 80 f8 d3 fe 3f 61 fe ff 51
.........
Markus
@Links2004
Dec 08 2015 11:37
never seen this. have you flashed the bin file?
Rohit Yermalkar
@romuye123
Dec 08 2015 11:41
yes
once i did it,
after that getting such crash
Endre Karlson
@ekarlso
Dec 08 2015 11:42
hey guys, so for the code sprintf(id, "esp-ctrl-%s", WiFi.macAddress().c_str()); how can I remove the : in the mac ?
Markus
@Links2004
Dec 08 2015 11:49
 uint8_t mac[6];
 WiFi.macAddress(mac);
sprintf(id, "esp-ctrl-%02X%02X%02X%02X%02X%02X", mac[0],  mac[1], mac[2], mac[3], mac[4], mac[5]);
some think like that.
@romuye123 try too wipe the flash, and then try again. https://github.com/esp8266/Arduino/blob/master/doc/eclipse/makefile.init#L32
Endre Karlson
@ekarlso
Dec 08 2015 11:54
hmmm
do you guys know if CoaP is supported for the arduino IDE ?
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 12:04
good morning all, what's the best way to know the frequency of an rfid tag?
Markus
@Links2004
Dec 08 2015 12:08
  • the marking
  • testing with different readers
125 kHz, 134 kHz and 13.56 MHz are the most used ones
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 12:19
a card reader with 125khz cant read a tag with 134khz frequency?
Markus
@Links2004
Dec 08 2015 12:45
yes, no read.
onkelfunny
@onkelfunny
Dec 08 2015 13:17
hello i have a problem with my wifi connection:
Setup done
add 1
aid 1
station: 60:03:08:8e:66:ae join, AID = 1
mac 662

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1264, room 16 
tail 0
chksum 0x42
csum 0x42
~ld
the client can connect, after a while the connection is dropped and the module restarts
onkelfunny
@onkelfunny
Dec 08 2015 13:23
i see i have this issue only i AP mode
Me No Dev
@me-no-dev
Dec 08 2015 14:03
@onkelfunny I have also found the AP mode to be really buggy recently. At first I thought that DHCP might be the cause, but then running all static the result was the same.
onkelfunny
@onkelfunny
Dec 08 2015 14:05
@me-no-dev i have this problem only in combination with the analogRead(A1) in the loop
Endre Karlson
@ekarlso
Dec 08 2015 14:16
hmm how does one set a static ip ?
Me No Dev
@me-no-dev
Dec 08 2015 14:23
//Static IP WiFiAP
WiFi.mode(WIFI_AP);
WiFi.softAPConfig(IPAddress(192,168,4,1), IPAddress(192,168,4,1), IPAddress(255,255,255,0));
WiFi.softAP(ap_ssid, ap_password);
wifi_softap_dhcps_stop();

//Static IP WiFi Station
WiFi.mode(WIFI_STA);
WiFi.config(IPAddress(192,168,4,2), IPAddress(192,168,4,1), IPAddress(255,255,255,0));
WiFi.begin(ssid, password);
wifi_softap_dhcps_stop might not be needed
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 14:30
@Links2004 128khz and 125khz will that make a diff to not read a tag
onkelfunny
@onkelfunny
Dec 08 2015 14:31
@me-no-dev the reason is not the analogRead(A1) ... the adafruit_neopixel library is the problem :(
Me No Dev
@me-no-dev
Dec 08 2015 14:32
how many pixels?
onkelfunny
@onkelfunny
Dec 08 2015 14:33
120
i set the Brightness in the main loop (photo-resistor)
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 14:41
@me-no-dev a card reader of 125khz can it read a card of 128
Endre Karlson
@ekarlso
Dec 08 2015 14:43
@igrr you got time to look at my pm ?
Me No Dev
@me-no-dev
Dec 08 2015 14:45
@Hassanbenlebsir no clue really, but I doubt it. There is more to the chips than their operating frequency.
@onkelfunny 120 is not much. They should refresh in 340uS. I have not checked how loand an analogRead takes, but should not be much also
do you update right after reading the ADC?
if so can you try adding like 5-10 ms delay
beikeland
@beikeland
Dec 08 2015 14:57
@Hassanbenlebsir i can confirm that 134khz tags do not work on 125khz readers.
onkelfunny
@onkelfunny
Dec 08 2015 14:59
@me-no-dev thx. i will try it
beikeland
@beikeland
Dec 08 2015 15:04
@Hassanbenlebsir if you have a reader that allows you to tune the resonant frequency maybe this datasheet helps http://priority1design.com.au/rfidrw-e-232.pdf
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 15:10
@beikeland yes i know that 134khz tags do not work on 125khz readers but 128 readers?
siedi
@siedi
Dec 08 2015 15:12
What / where are the mathematical functions declared? max(a,b) seems to be not the way as in the Arduino docs: https://www.arduino.cc/en/Reference/Max
beikeland
@beikeland
Dec 08 2015 15:13
@Hassanbenlebsir i don't know, sorry. but you'd have very poor range even if the binary protocols were compatible and the tag got enough rf energy to respond.
Me No Dev
@me-no-dev
Dec 08 2015 15:15
@siedi
#define max(a,b) (((a)>(b))?(a):(b))
#define min(a,b) (((a)>(b))?(b):(a))
siedi
@siedi
Dec 08 2015 15:15
alright
thx
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 15:27
@beikeland do you know where i can find a 125khz rfid reader
beikeland
@beikeland
Dec 08 2015 15:29
@Hassanbenlebsir they're quite cheap on ebay / ali, but takes about two weeks to get anywhere
@Hassanbenlebsir but you should find out what standard the tag you're wanting to read is before buying a reader. I don't think i've come across incomatabilities with 125khz, but better safe than sorry
Sven Eliasson
@comino
Dec 08 2015 15:35
hey guys, is anyone working on a websocket client?
Sven Eliasson
@comino
Dec 08 2015 15:36
deam.. I want to contribute something useful :P
But I bet without ssl handshake, right? ;)
Markus
@Links2004
Dec 08 2015 15:40
not implemented yet, but possible.
Sven Eliasson
@comino
Dec 08 2015 15:40
your implementation looks nice, maybe I try to add that :)
or do you anyway plan to do that
?
Markus
@Links2004
Dec 08 2015 15:42
its only doing, basically I will do it like i done in the httpClient
https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp#L534-L550
i only need some refactoring of the current code to use pointers to the socket.
but like always its a question of free time ;)
Sven Eliasson
@comino
Dec 08 2015 15:43
ofc
Endre Karlson
@ekarlso
Dec 08 2015 17:39
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
what's that caused by again ?
hmmms @igrr if I disable my TLS / SSL then it doesn't crash
Markus
@Links2004
Dec 08 2015 17:44
rst cause:2 = reset pin
add Serial.setDebugOutput(true); to see more info of the crash
Endre Karlson
@ekarlso
Dec 08 2015 18:06
How does one start sntp in the code ?
I've seen setServer lying around but unable to access it when I import time.c
beikeland
@beikeland
Dec 08 2015 19:12
Anyone using ardino_debug.exe to build firmware who is seeing non-zero exit codes when it fails? I get zero regardless.
beikeland
@beikeland
Dec 08 2015 19:32
(never mind, it does return correct exit codes when you check after arduino_debug and not after the following copy command...)
Chris Elsworth
@celsworth
Dec 08 2015 20:08
@igrr PaulStoffregen/OneWire#6 broke my DS18B20 :(
trying ot narrow down which bit exactly
Ivan Grokhotkov
@igrr
Dec 08 2015 20:09
Chris Elsworth
@celsworth
Dec 08 2015 20:10
maybe if I set it back to INPUT_PULLUP after the init
trying
strange, no, that doesn't seem to help
Martin Ayotte
@martinayotte
Dec 08 2015 20:13
Or add an external 4K7 pullup, since anyway ESPs internal pullup are too weak.
Chris Elsworth
@celsworth
Dec 08 2015 20:15
I guess, but it worked fine before. its only two sensors on a tiny wire, doesn't need much
not sure why jsut setting it back to PULLUP doesn't work though
Chris Elsworth
@celsworth
Dec 08 2015 20:23
hm maybe its something else, I went back to the bundled OneWire library and still getting 85c results
Chris Elsworth
@celsworth
Dec 08 2015 20:29
4.7k did change things, still giving bizarre readings though. 55c in a 20c room.
celsworth @celsworth gives up on parasitic power and just runs another wire
Chris Elsworth
@celsworth
Dec 08 2015 20:32
works fine.
think someone else in here reached the same conclusion yesterday :)
Martin Ayotte
@martinayotte
Dec 08 2015 20:41
GPIO can't provide enough power for multiple DS in parasitic. Even Dallas suggest to use a MOSFET controlled by another GPIO for parasitic.
Chris Elsworth
@celsworth
Dec 08 2015 20:42
maybe I just got lucky before :)
Martin Ayotte
@martinayotte
Dec 08 2015 20:42
Probably ! ESP GPIOs can't provide more than 12mA if I remember.
Chris Elsworth
@celsworth
Dec 08 2015 20:44
datasheet says it only needs 1.5 but across the 10k maybe its just too much in a short time
too much voltage drop
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 21:19
good evening this time i don't want to ask nothing about the esp haha i just want to wish you all the best with what ever you working on
Endre Karlson
@ekarlso
Dec 08 2015 21:36
@igrr you about ?
@igrr how does one start sntp properly for the TLS stuff to work ?
Martin Ayotte
@martinayotte
Dec 08 2015 21:36
@celsworth , what do you means "across 10K" ? the parasitic power is not across resistor, it needs 1.5mA when it is thru MOSFET directly on 3.3V (look at page 3 of https://datasheets.maximintegrated.com/en/ds/DS18B20-PAR.pdf)
Chris Elsworth
@celsworth
Dec 08 2015 21:46
oh I see now
M0ebiu5
@M0ebiu5
Dec 08 2015 22:11
@Links2004 it would be nice to see more details of your vnc client project.
Endre Karlson
@ekarlso
Dec 08 2015 22:14
http://pastebin.com/9VKsWLNy < anyone know what can cause that ?
Markus
@Links2004
Dec 08 2015 22:38
@M0ebiu5 its a full implementation of the client part of RFB protocol (VNC) based on the Orginal vnc code.
complete rewrite as c++ class and many speed and memory optimizations for embedded devices.
supporting: raw, rre, corre and hextile encoding.
but i need to do some stuff before i can release it, sorting the API, and sorting the licence stuff out.
Endre Karlson
@ekarlso
Dec 08 2015 22:42
// te
/code foo
hmmms
Markus
@Links2004
Dec 08 2015 22:45
Soft WDT reset, you need some delay(0); in your code.
Endre Karlson
@ekarlso
Dec 08 2015 22:46
@Links2004 sorry ?
@Links2004 the sketch is http://pastebin.com/1nLFJ9Dd
Markus
@Links2004
Dec 08 2015 22:49
sy, having two conversions in two languages at the same time.
Hassanbenlebsir
@Hassanbenlebsir
Dec 08 2015 22:49
haha
@Links2004 can happen
Markus
@Links2004
Dec 08 2015 22:53
@ekarlso you code looks good, may its the library.
Endre Karlson
@ekarlso
Dec 08 2015 22:54
@Links2004 hmmms, I'll wait for @igrr
it doesn't work when requiring a client cert on the mosquitto server