These are chat archives for esp8266/Arduino

15th
Aug 2015
Gustavo Freddo Breunig
@gustavobreunig
Aug 15 2015 00:14
Hi folks
I can't find an example on how upload files (html and js files) to my esp8266
using arduino
there is some software to do that (like ESPlorer in the nodeMCU)?
Len Trigg
@Lenbok
Aug 15 2015 06:24
So, I have wired my ESP module as described in the boards.md, "Minimal Hardware Setup for Bootloading and Usage" and it works for uploading etc, but the ESP hangs when I connect the serial monitor and stays hung until I close the serial monitor (at which point it resets). If I disconnect the RTS--RESET wire, then connecting the serial monitor works fine (but then the auto-upload handling no longer works). Is there a way to have the best of both worlds (as seems to work with the NodeMCU modules)
Ivan Grokhotkov
@igrr
Aug 15 2015 06:57
@sticilface we need to find a way to send ieee80211 NUL frames, this was proposed by @projectgus as a clean solution for taking station offline while interrupts are disabled. should help everyone who is driving addressable LEDs and doing similar stuff which requires interrupts to be disabled for a long time.
Michael Miller
@Makuna
Aug 15 2015 07:02
@igrr what do you consider a long time? In @sticilface case, we are talking every 5ms they are disabled for 100ns to get it to fail in a few minutes. 100ns doesn't seem very long.
sticilface
@sticilface
Aug 15 2015 07:28
The 5ms was just a test. In fact driving 150Leds the show command takes longer than that. About 12ms I think. My standard update time is 30ms as u proposed in your sketch. How long does bitbanging 150 leds take. Peter scargil has been driving 500 I think and says it's fine. But is having similar rebooting with mqtt alone. I removed mqtt but still get the restarting.
Harrison Mclean
@h4rm0n1c
Aug 15 2015 08:49
@Lenbok It sounds like the RTS line isn't going low. Also, I believe you're better off not connecting the 3.3v supply to the serial adapter if you can, because most of these usb serial adapters have a hard time supplying enough current to reliably run the esp8266, I think even the nodemcu uses an lm1117 regulator for this reason.
Harrison Mclean
@h4rm0n1c
Aug 15 2015 09:12

Just as an aside, I'm also working with a library that sends a lot of data on a timer interrupt, also every 5ms, I need to collect data regarding the update times, but the big difference with mine is that I'm using the HSPI port to drive a 32 x 16 dot matrix display.

I haven't tried it with any networking running yet, so that's going to be interesting... What would be the best way to get data out regarding the execution time of a timer interrupt? Should I just call it manually and measure it with millis()? I ask because it sounds like the more data you have regarding these issues, the better.

Ivan Grokhotkov
@igrr
Aug 15 2015 11:07
if you plan to use hardware SPI, you shouldn't need to disable interrupts, so you just need to be sure mac layer doesn't get overflowed with packets while you are sending stuff. if your update duration is less then 10ms, it is unlikely you will get an overflow there
Len Trigg
@Lenbok
Aug 15 2015 11:33
@h4rm0n1c I am supplying the 3.3v via separate supply which is not connected to the serial adapter 3.3v. Perhaps it is my serial adaptor with the problem? I am using this CP2102 adaptor: http://www.aliexpress.com/item/Brand-New-Wholesale-Price-6Pin-USB-2-0-to-TTL-UART-Module-Serial-Converter-CP2102-STC/32285127992.html (getting RTS from the side)
Len Trigg
@Lenbok
Aug 15 2015 11:39
(Is it possible to tell the serial monitor, or gnu screen, to leave the RTS line alone?)
d-anders
@d-anders
Aug 15 2015 11:43
you should connect the grounds, but im not sure that is what is causing your problems
Len Trigg
@Lenbok
Aug 15 2015 11:46
Yes, grounds are connected. I dont' have the capacitor between VCC and GND, but I wouldn't imagine that is the problem?
d-anders
@d-anders
Aug 15 2015 11:48
doubt it unless your psu is really bad
i've never used automatic reset
d-anders
@d-anders
Aug 15 2015 11:56
what are you using for pullups/downs?
Harrison Mclean
@h4rm0n1c
Aug 15 2015 16:27
The recommended pullup/pulldown is 10k, but I've gone as low as 2k, which is sometimes necessary to counter the slightly stronger pullups or pulldowns of other devices.
Such as your usb to serial adapter.
also, try getting realterm and seeing what state the DTR and RTS lines are in, you can also toggle them from this software.
sticilface
@sticilface
Aug 15 2015 17:04
Where might i find the documentation for what the 0-15 levels of interrupt mean.... I've gone through the sdk docs, but couldn't find much.. found this but it seems different
/* disable all interrupts */
#define ETS_INTR_LOCK()
/* enable all interrupts */
#define ETS_INTR_UNLOCK()
9
ets_intr_lock()
ets_intr_unlock()
Michael Miller
@Makuna
Aug 15 2015 17:47
It's in the chip documents, search for rsil. The information is not great. But, we exposed the level changes in Arduino.h, again search for rsil and you find them with comments. I improved them a few weeks back so the level could be included but I am unsure if the changes made it the release builds yet. Nointerrupts() uses them.
The ets functions disable the sdk related interrupts, but they do not disable all interrupts. They do not work for bit banging, this was learned while creating the NeoPixel solution.
Harrison Mclean
@h4rm0n1c
Aug 15 2015 18:48
Ok, I've done some tests, hspi with timer0 driving a dot matrix display is ~85us per refresh, refreshes are called every 1ms, just abusing the spi protocol by pushing it into shift registers hooked up to leds, works really well.
could such a technique be adapted for the neopixels?
Harrison Mclean
@h4rm0n1c
Aug 15 2015 19:05
That's 0.16us per pixel, since it's 512 pixels. That's running SPI at 4Mhz
Harrison Mclean
@h4rm0n1c
Aug 15 2015 19:20
I increase SPI speed to 8mhz, ~68us, 16mhz ~58us, 40mhz ~50us.
Harrison Mclean
@h4rm0n1c
Aug 15 2015 19:28
I think I'm going to have to get some neopixels...
sticilface
@sticilface
Aug 15 2015 19:28
that is pretty quick!
Harrison Mclean
@h4rm0n1c
Aug 15 2015 19:54
oh bugger, my bad, it only updates a quarter of the pixels at any one time, it's 128 pixels per update. that would make it 0.22us per pixel
*ugh no, it's 0.44us...
Michael Miller
@Makuna
Aug 15 2015 21:49
1.25ns per bit is the spec, 24 of those per pixel, 10% error on that is the best or worst you can do without problems.