These are chat archives for esp8266/Arduino

27th
Dec 2015
Mario Mikočević
@mozgy
Dec 27 2015 12:33
yei, got the picture from ArduCAM on esp8266 :D
brutzler
@brutzler
Dec 27 2015 13:02
Hi,
using a NodeMCU (ESP-12) just coming up some questions:
Are there are any GPIOs, that are not for free use: e.g. GPIO16/GPIO9 or GPIO10.
Some GPIOs I do not find at all: GPIO6/7/8
What about the Pins on the left side MOSI(SD1) / CS(CMD) / MISO(SD0) / SCLK(CLK). Somewhere heard, they are for the internal SPI.
Does anybody have more informations to this?
I just remember, that GPIO16 is only for normal use or so...
Me No Dev
@me-no-dev
Dec 27 2015 13:35
nodemcudevkit_v1-0_io.jpg
all marked with GPIO are usable
the left side SPI pins are for the flash memory and you can not use them
brutzler
@brutzler
Dec 27 2015 13:37
OK. Wasn't there any issue with GPIO9/10?
Me No Dev
@me-no-dev
Dec 27 2015 13:37
on regular ESPs those are also used for the flash
brutzler
@brutzler
Dec 27 2015 13:37
what is regular?
Me No Dev
@me-no-dev
Dec 27 2015 13:38
only available on ESPs on node MCU
regular -> any other
NodeMCU uses a specific iteration of the ESP12 and it just actually looks like ESP12
different trace layout nd DIO flash
brutzler
@brutzler
Dec 27 2015 13:39
??? this I do not really understand.....
Me No Dev
@me-no-dev
Dec 27 2015 13:40
ok :) just know that you can use 9 and 10 only on nodeMCU
brutzler
@brutzler
Dec 27 2015 13:41
let me stay unknowing ;-) will ask aunt google
But I know for now, i have two IOs more. thx
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:01
has anyone ever written an RF ASK receiver?
Kiril Zyapkov
@kzyapkov
Dec 27 2015 14:03
@crushedice2000 my wiring was fine. my fake FTDI must be one of the faker ones. Swapped it for an original FTDI cable and it worked fine. The esptool.py hack with smaller blocks didn't fix it for my piece of chinese sh*t. Lesson learned, too bad it took a couple of days :)
Me No Dev
@me-no-dev
Dec 27 2015 14:06
@skorokithakis I'm not sure what you mean by that? I have used RF ASK a bit in both directions, but I use ASK modules to get the signal and output the data
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:09
that's the ones i have, i'm trying to write the receiving side
and i just burnt my nodemcu for some reason :(
Me No Dev
@me-no-dev
Dec 27 2015 14:09
5V output
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:09
oh
no
protip
don't stick the other end of the antenna into the 5v rail of the breadboard to "keep it taut"
goddamnit
hm
Me No Dev
@me-no-dev
Dec 27 2015 14:11
@skorokithakis RX depends on what you TX
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:11
so, how did you implement the receiver? did you write it yourself?
i'm transmitting arbitrary timings i wrote
long is 1500 usec, short is 500
Me No Dev
@me-no-dev
Dec 27 2015 14:11
if you TX Serial at 4800 lets's say, that is what will come out
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:11
so i want to read the sequence on the other end
Me No Dev
@me-no-dev
Dec 27 2015 14:12
ok, what is 0 and what is 1?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:12
there isn't any, there's just short and long
and i'm reading the edges and checking whether the duration is what it should be
but it's noisy
as in, the timings i get are off sometimes
and my code is causing watchdog resets even though it's not really blocking anywhere :/
Me No Dev
@me-no-dev
Dec 27 2015 14:14
they are not all that reliable :) you are using pin interrupt to get the edges right?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:14
no, i'm in a loop and checking to see when they changed
a pin interrupt would be more reliable, right?
Me No Dev
@me-no-dev
Dec 27 2015 14:15
that will not give you accurate readings and can cause a probem
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:15
ah
do you have any sample code on how i could use an interrupt?
Me No Dev
@me-no-dev
Dec 27 2015 14:15
if you use one pin interrupt in your sketch, the delay is about 2us from the event
void pinChanged(){
  //the pin changed it's level
}

void setup(){
  attachInterrupt(PIN, pinChanged, CHANGE);
}
Me No Dev
@me-no-dev
Dec 27 2015 14:21
watch out not to delay in pinChanged
it's a hardware interrupt and blocks everything else
you can detect the edge direction and note the micros() then set a flag that a pulse have been received
check that flag in the loop and print the data from there
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:25
oh, that's very simple, thank you
how many interrupts can i have?
Me No Dev
@me-no-dev
Dec 27 2015 14:26
on all pins but 16
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:26
can i have them all at once?
Me No Dev
@me-no-dev
Dec 27 2015 14:26
they execute in order though
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:26
that should be fine
Me No Dev
@me-no-dev
Dec 27 2015 14:26
if you get an interrupt on pins 1,2 and 5 for example at the same time
it will call the handler for 1 first then 2 so on
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:27
sounds good, thank you
by the way, a digitalRead in the interrupt is sure to have the correct (new) value, right?
Me No Dev
@me-no-dev
Dec 27 2015 14:28
not really :) it depends if you are the first handler
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:28
hmm, what can happen if i'm not?
Me No Dev
@me-no-dev
Dec 27 2015 14:28
if you are not, the event might have gone away by the time you got the handler called
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:28
oh, right
no, that will stay there for around 1 ms
so hopefully this is much faster
by the way, do you guys prefer the nodemcu or the wemos d1 mini?
Chris Elsworth
@celsworth
Dec 27 2015 14:31
haven't used a d1
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:31
hmm
i just burnt a nodemcu so i'm wondering what to replace it with
Chris Elsworth
@celsworth
Dec 27 2015 14:32
the nodemcu are fine for me, especially the smaller ones
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:32
my problem is that they come with a boatload of reserved/unusable pins
Chris Elsworth
@celsworth
Dec 27 2015 14:32
some of the early versions are far too big.. bigger than they needed to be
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:32
yeah, i have two of those, they're only useful for pcbs
Me No Dev
@me-no-dev
Dec 27 2015 14:32
static const uint8_t PIN = 5;
static bool pinHasChanged = false;
static uint32_t pulseStart = 0;
static uint32_t pulseLength;
void pinChanged(){
  if(difitalRead(PIN)){
    pulseStart = micros();
  } else {
    pulseLength = micros() - pulseStart;
    pinHasChanged = true;
  }
}

void setup(){
  attachInterrupt(PIN, pinChanged, CHANGE);
}

void loop(){
  if(pinHasChanged){
    pinHasChanged = false;
    Serial.printf("Pulse: %uus\n", pulseLength);
  }
}
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:32
i stick some stuff under them and put headers around
@me-no-dev oh, calculating the length in there is okay? i was just setting a flag and marking the micros() and doing everything else in the loop
Chris Elsworth
@celsworth
Dec 27 2015 14:33
calculation is fast
you can spend a few us doing some calcs, just don't try and start printing to serial cos that is hugely slow, you'll just end up with resets
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:34
oh, definitely
by the way, which nodemcu version do you guys prefer?
Chris Elsworth
@celsworth
Dec 27 2015 14:34
probably not even us, more like ns for a int - int :)
Me No Dev
@me-no-dev
Dec 27 2015 14:34
it's ok to do the calculations there, then you can add the values to a buffer if you transmit more than one pulse or the loop is busy
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:34
ah, great
Chris Elsworth
@celsworth
Dec 27 2015 14:34
I dunno, the small one.. whatever thats called, their version numbers are confusing
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:35
there's the wide one that nobody needs, and the small one has two different chips
CH340 and another one
Chris Elsworth
@celsworth
Dec 27 2015 14:35
I have a nice small one marked "devkit v2"
but then I have a wider one marked "nodemcu v3"
so who knows
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:36
cp2102
that's how you distinguish them
Chris Elsworth
@celsworth
Dec 27 2015 14:36
CP2102 is supposed to be better for drivers, windows works with it out of the box
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:36
eh, if that's the only difference, i don't care
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:49
damn, there's a lot of noise that flips bits
one in ten commands succeeds
i don't actually know whether there's noise or whether i'm doing something wrong, because the pre-built modules seem to be handling it fine
Me No Dev
@me-no-dev
Dec 27 2015 14:51
have a scope or logic analizer?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:52
i do, but it's just super noisy
let me try again
there seems to be something transmitting constantly
Me No Dev
@me-no-dev
Dec 27 2015 14:55
why not go with something simpler so you can debug the pulses you are getting
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:55
like what?
Me No Dev
@me-no-dev
Dec 27 2015 14:56
like what I wrote above, but maybe put the pulses in buffer so you do not miss any while printing
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:57
i don't print the pulses as they come, i just print whether they succeed or fail
but i'm looking at the logic analyzer right now
and there's a constant pulse every 50 ms
Me No Dev
@me-no-dev
Dec 27 2015 14:58
those ASK things are quite commong in cheap chinese devices
maybe your neighbor has a remote weather station or something
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:59
nah, i'm in a small village, i'm surprised there's anything transmitting at all
Me No Dev
@me-no-dev
Dec 27 2015 14:59
what is the length of the pulse?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 14:59
seems to be 50ms on, 50ms off
Me No Dev
@me-no-dev
Dec 27 2015 15:00
that is bad :) you can only get a reliable reading if you transmit during those 50ms off
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:02
yeah :/ but i have other things transmitting and they don't have a problem
Me No Dev
@me-no-dev
Dec 27 2015 15:02
on the same freq?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:02
yeah
Me No Dev
@me-no-dev
Dec 27 2015 15:02
ASK as well?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:03
yep
Mario Mikočević
@mozgy
Dec 27 2015 15:04
nodeMCU -> you distinguish them by who made them - Amica, Doit, LoLin
Me No Dev
@me-no-dev
Dec 27 2015 15:04
hm... have other receivers that you can debug? maybe your RX is bad?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:04
@me-no-dev sure, let me try
@mozgy ah, which one is the best?
@me-no-dev oh goddamnit, the ESP LED is flashing and that's what's producing interference
Mario Mikočević
@mozgy
Dec 27 2015 15:05
dunno really, first LoLin one is the worst tho
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:05
@mozgy the wide one?
Mario Mikočević
@mozgy
Dec 27 2015 15:05
crap voltage regulator
no, first wide one is Amica
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:06
oh
Mario Mikočević
@mozgy
Dec 27 2015 15:06
lemme find pic
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:06
thanks
Mario Mikočević
@mozgy
Dec 27 2015 15:07
nodeMCU.jpg
all three work fine
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:08
i have the bottom one, by amica
and the middle one
do you know which one the crappy one is?
Mario Mikočević
@mozgy
Dec 27 2015 15:09
that ali link is 2nd LoLin one
good one
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:09
oh good
i bought some of those
thanks
Mario Mikočević
@mozgy
Dec 27 2015 15:09
you can see BIG voltage reg
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:09
right
Mario Mikočević
@mozgy
Dec 27 2015 15:13
hmm, now I have to buy one .. (pokemon sindrom, gotta have'em all :) )
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:13
haha, why would you want this huge one?
Mario Mikočević
@mozgy
Dec 27 2015 15:14
;)
Mario Mikočević
@mozgy
Dec 27 2015 15:14
as I wrote - gotta'have'em all
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:14
then you need a wemos as well
Mario Mikočević
@mozgy
Dec 27 2015 15:16
kinda don't like size of that
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:16
@mozgy what's the component next to the RST button, close to the GND pin?
you don't like how small it is? :smile:
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:17
@brutzler oh yeah, i saw that one, what is it?
Mario Mikočević
@mozgy
Dec 27 2015 15:17
@brutzler can't find free shipping one :)
@skorokithakis which board ?
brutzler
@brutzler
Dec 27 2015 15:18
its a NodeMCU with a ESP-12F, a LDO and a RGB on it
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:18
@mozgy you don't like how small the wemos is?
@brutzler that looks great
brutzler
@brutzler
Dec 27 2015 15:18
Its free shiping to germany...LOL
Mario Mikočević
@mozgy
Dec 27 2015 15:18
it's not to Croatia :(
wemos is arduino-uno-wannabe
@skorokithakis what component do you want to know ?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:21
@mozgy oh, on the bottom board, amica
closest to the gnd pin and the RST button
Mario Mikočević
@mozgy
Dec 27 2015 15:21
diode S4
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:21
right
i burnt that one
figure i can replace it and get it working again?
or should i just toss it?
Mario Mikočević
@mozgy
Dec 27 2015 15:22
reverse voltage ? :)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:22
yeah :(
stuck the receiver's antenna in the 5v rail by mistake
Mario Mikočević
@mozgy
Dec 27 2015 15:22
no harm in replacing
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:22
i don't have an SMD diode... maybe i should just solder the components together
Mario Mikočević
@mozgy
Dec 27 2015 15:22
I do think it's there for that exact reason
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:22
haha, yep
Mario Mikočević
@mozgy
Dec 27 2015 15:23
40x S4 is like $1
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:23
they are, but they'll take a month to arrive
Mario Mikočević
@mozgy
Dec 27 2015 15:23
right
better than dumping whole module
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:24
yeah
i can stick it somewhere i know it won't get reverse voltage
and be done with it
@mozgy also, why do you think the wemos is a wannabe?
Mario Mikočević
@mozgy
Dec 27 2015 15:25
ah that one, that's nice
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:25
yeah
probably better than a nodemcu
not so many useless pins
Mario Mikočević
@mozgy
Dec 27 2015 15:26
the best path is to make yer own PCB :) :p
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:26
oh i did
but soldering everything on it costs $50 of my time, and these are $4 :smile:
Mario Mikočević
@mozgy
Dec 27 2015 15:27
huh $50 ? how did you come to that ?
in tinkering you don't measure time with $$ :)
Me No Dev
@me-no-dev
Dec 27 2015 15:29
and the joy of getting it to work is priceless :D
Mario Mikočević
@mozgy
Dec 27 2015 15:30
exactly
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:32
soldering the first one is the joy of getting it to work
soldering the next five is just boring :smile:
Me No Dev
@me-no-dev
Dec 27 2015 15:32
thats true too :D
Mario Mikočević
@mozgy
Dec 27 2015 15:32
speaking of it, I'm ecstatic now, made esp-12 with arducam working
Me No Dev
@me-no-dev
Dec 27 2015 15:33
how fast are tyou getting the image?
Mario Mikočević
@mozgy
Dec 27 2015 15:33
well, currently very slow, since I made workaround with SPIFFS
websockets do not work with 2.0.0 stable
Me No Dev
@me-no-dev
Dec 27 2015 15:36
as far as I remember that uses the from-source lwip and it's not really stable
brutzler
@brutzler
Dec 27 2015 15:37
This D1-mini is a ESP-12F too.....
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:39
is the 12F better?
Chris Elsworth
@celsworth
Dec 27 2015 15:39
better antenna, allegedly
not seen any real world results on the difference it makes
Me No Dev
@me-no-dev
Dec 27 2015 15:39
it's certified as well
brutzler
@brutzler
Dec 27 2015 15:44
And there is a schematic available.
Nothing found til now from this one, I posted the link...
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:47
looks like i should get more D1s
brutzler
@brutzler
Dec 27 2015 15:47
D1 or D1-mini?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:48
mini, sorry
brutzler
@brutzler
Dec 27 2015 15:49
With the D1 I could use my old Arduino shields...
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:49
can't it?
brutzler
@brutzler
Dec 27 2015 15:49
??
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:51
can't it use the arduino shields?
brutzler
@brutzler
Dec 27 2015 15:52
I only ment, that the D1 has the UNO-size, and it looks like the arduino shields would fit without aditional wiring....
Markus
@Links2004
Dec 27 2015 15:52
@brutzler when the shield work with 3.3V then yes
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:52
oh sorry
brutzler
@brutzler
Dec 27 2015 15:52
But I think 3,3 - 5V problem (too late)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:53
i thought you said "WISH the d1 could use"
i'm sure the d1 will have regulators for 5v, it looks like it's meant to be arduino-compatible
Markus
@Links2004
Dec 27 2015 15:54
the image look like the wires goes straid to the pins so no 5V I/O,
you can power it from USB, it has a LDO like the most ESP boards.
D1
brutzler
@brutzler
Dec 27 2015 15:54
Yes 5V -> 3,3V Regulator, but the ESp is working with 3,3V
And no levelshifter for the GPIOs (again too late)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 15:55
ah, that's too bad
brutzler
@brutzler
Dec 27 2015 15:55
But for a 3,3V-shield its matching....
ISP-Header missing.... :-(
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:00
bleh, i can't get this ASK module to work reliably...
brutzler
@brutzler
Dec 27 2015 16:08
ASK-module?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:08
i'm trying to make an RF receiver
but it looks like i'm doing something wrong
brutzler
@brutzler
Dec 27 2015 16:08
oh, much luck
BRB
Martin Ayotte
@martinayotte
Dec 27 2015 16:21
Those RF433 receiver modules always get some noise received when there is no transmitter data, there is no squelsh filter. It is up to the firmware to filter that.
Although I didn't try them myself, here are some libraries : https://github.com/pimatic/RFControl
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:28
@martinayotte that's very helpful, thanks! i've also found that they receive noise until you start transmitting, but what i'm seeing now is the module receiving noise all the time, not just until transmission starts
maybe i should try a 433 remote i have and see if that works
Martin Ayotte
@martinayotte
Dec 27 2015 16:31
Maybe decoupling capacitor on RF433 receiver would help. Or, power it with 5V and add voltage level translator on the output.
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:31
hmm, i AM powering it with 5V, is that bad for the ESP?
Martin Ayotte
@martinayotte
Dec 27 2015 16:31
Here is another interesting site (although not ESP specific) http://randomnerdtutorials.com/rf-433mhz-transmitter-receiver-module-with-arduino/. RadioHead library allowing to send/receive any kind of packet.
Do you mean that the RF receiver output with 5V logic signal is directly connected to ESP ? Yes, you can get trouble that way, add a voltage divider or level translator
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:33
ah, thanks, i should do that
Martin Ayotte
@martinayotte
Dec 27 2015 16:36
I means, it is probably not the source of the noise, but it will prevent damaging of your ESP.
In RadioHead library, the following examples look so simple that I think I will hook up some modules on my ESP this afternoon :-)
RadioHead/examples/ask/ask_receiver/ask_receiver.pde and RadioHead/examples/ask/ask_transmitter/ask_transmitter.pde
Mario Mikočević
@mozgy
Dec 27 2015 16:41
hmm, I think I have one tr/rec 433 combo in my bin .. might try that too :)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:48
@martinayotte the problem with that is that only my receiver can run that library
the other end is a raspberry pi running lirc
so it's limited in what it can send
Martin Ayotte
@martinayotte
Dec 27 2015 16:50
Euhh ? LIRC is an infrared library ... what is the relation with RF433 ?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:51
it's a library that can produce real-time high and low pulses :P
it doesn't care whether it's connected to an IR led or an RF transmitter
Martin Ayotte
@martinayotte
Dec 27 2015 16:52
Of course, but then you stuck with the IR protocol. I've just found a link where someone used RCswtich on Raspberry : http://www.homautomation.org/2014/03/02/433mhtz-rf-communication-between-arduino-and-raspberry-pi-arduino-as-receiver/
I will try to find one with RadioHead ...
Stavros Korokithakis
@skorokithakis
Dec 27 2015 16:53
nah, there's no protocol, you just tell it how long to pulse for
@martinayotte looks like this: https://www.pastery.net/byuqgh/
Martin Ayotte
@martinayotte
Dec 27 2015 16:56
Yes, but then you need to do the "squelsh noise" removal by yourself ...
Here is another one, in french, http://electroniqueamateur.blogspot.ca/2014/10/communication-rf-433-mhz-entre.html (the VirtualWire library author is the same as RadioHead, Mike McCauley)
Chris Elsworth
@celsworth
Dec 27 2015 17:02
seems bogus
WifiUdp has the same define at 8192, which causes an "already defined" warning fwiw
Stavros Korokithakis
@skorokithakis
Dec 27 2015 17:03
@martinayotte the noise removal is fine, as i'm sending a long "reset" header at the start
unless you mean noise removal in the transmission body itself
Dmitry Kireev
@kireevco
Dec 27 2015 17:05
What are you guys using for unit /integration testing for the platform?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 17:06
nothing :(
Dmitry Kireev
@kireevco
Dec 27 2015 17:06
@skorokithakis do you need one?
niteshpatil004
@niteshpatil004
Dec 27 2015 17:07
anyone please share how to work on esp8266 external EEPROM and using arduino IDE where exactly our program go and sit in esp8266?
Dmitry Kireev
@kireevco
Dec 27 2015 17:07
@skorokithakis what's on the market for automated testing for arduino/esp?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 17:07
@kireevco i have no idea, i don't really write programs that need to be unit-tested, they're all less than 1k lines long
Martin Ayotte
@martinayotte
Dec 27 2015 17:09
@kireevco , IGRR is using Travis-CI when we submit any PR ...
Mario Mikočević
@mozgy
Dec 27 2015 17:09
@kireevco not yet in that stage, max run here is 20 units ..
Dmitry Kireev
@kireevco
Dec 27 2015 17:09
@martinayotte well, that's for Arduino, I mean for actual device/code
Chris Elsworth
@celsworth
Dec 27 2015 17:09
without a good emulator, how can you?
Dmitry Kireev
@kireevco
Dec 27 2015 17:10
@celsworth flash on a real device, for instance?
Chris Elsworth
@celsworth
Dec 27 2015 17:10
or you have stacks of devices piled up to run your tests? :)
Dmitry Kireev
@kireevco
Dec 27 2015 17:10
@celsworth yep
Martin Ayotte
@martinayotte
Dec 27 2015 17:10
@niteshpatil004 , I've answered to that question on the forum : http://www.esp8266.com/viewtopic.php?f=32&t=7297
Chris Elsworth
@celsworth
Dec 27 2015 17:10
@kireevco there may be a market in selling that as a product
Dmitry Kireev
@kireevco
Dec 27 2015 17:10
hehe
Chris Elsworth
@celsworth
Dec 27 2015 17:10
not many people have enough esps to stack up and run tests on
Dmitry Kireev
@kireevco
Dec 27 2015 17:11
I'm working on some prototype
@celsworth what tests would you run?
Chris Elsworth
@celsworth
Dec 27 2015 17:11
good question. not sure :) probably that interrupts and timers work as expected for starters
so would need a way to make gpios go low/high according to some preprogrammed routine
hmph, spi chip-select pin looks hardcoded in the W5100 library
I'm guessing not many people use this :(
Stavros Korokithakis
@skorokithakis
Dec 27 2015 17:15
@martinayotte would you happen to know how radiohead does noise reduction?
niteshpatil004
@niteshpatil004
Dec 27 2015 17:21
when we flash program to esp8266 using arduino IDE, where exactly program is flashed ?
Martin Ayotte
@martinayotte
Dec 27 2015 17:55
@niteshpatil004 , look at http://esp8266.github.io/Arduino/versions/2.0.0/doc/filesystem.html, it is at SPIFFS end.
Also, in EEPROM.cpp, you can see instantiation at the end : EEPROMClass EEPROM((((uint32_t)&_SPIFFS_end - 0x40200000) / SPI_FLASH_SEC_SIZE));
@skorokithakis , I don't know, and I've just started looking into it, it seem a bit difficult to port it to ESP, at least at first look.
Stavros Korokithakis
@skorokithakis
Dec 27 2015 17:57
@martinayotte oh, radiohead doesn't run on the esp?
i'm thinking of setting a flag when the long header ends and then checking whether the next change was 500usec or 1500used after that
Martin Ayotte
@martinayotte
Dec 27 2015 18:02
@skorokithakis , RadioHead is generic for Arduino, but not ported yet for ESP. If it is too hard, maybe RCswitch will be the way to go.
Stavros Korokithakis
@skorokithakis
Dec 27 2015 18:06
hmm, rcswitch looks interesting, thank you
niteshpatil004
@niteshpatil004
Dec 27 2015 18:25
@martinayotte thank you
i am saving wifi configuration settings using EEPROM.Write and EEPROM.read in ARDUINO IDE, where these data are stored? whether in external EEPROM or in esp memory itself?
Mario Mikočević
@mozgy
Dec 27 2015 18:27
emh ->
Progress: 100%
End
state: 5 -> 0 (0)
rm 0
pm close 7 0 0/170354223
del if0
usl
sul 0 0

 ets Jan  8 2013,rst cause:2, boot mode:(1,7)


 ets Jan  8 2013,rst cause:4, boot mode:(1,7)

wdt reset
@me-no-dev @Links2004 any hint how to debug this ?
Markus
@Links2004
Dec 27 2015 18:31
the ESP has no memory itself all is stored in the SPI flash,
ets Jan 8 2013,rst cause:4, boot mode:(1,7)
the reboot problem is tracked here: #1017
and its a general reboot problem (not linked to OTA).
Mario Mikočević
@mozgy
Dec 27 2015 18:32
yes, I know that, I'm asking how can I help in debugging it ?
other that bumping into it
niteshpatil004
@niteshpatil004
Dec 27 2015 18:32
if both program and data are stored in same spi flash, then there are chances of overwrite and loss of data
Markus
@Links2004
Dec 27 2015 18:34
@mozgy it has to with how the sketch is startet the first time,
my speculation is that somewhere the last bootmode is stored and on the system_restart() call it boots to the same mode,
which is in this case uart Bootloader.
@niteshpatil004 they are in the same flash yes, but you can not override anything by using the EEPROM API,
inside the SPI flash we habe reserved 4KB that only used for EEPROM emulation.
@mozgy the big question is where this info is stored, and can we override it.
but too finde it is hard, only full ram / register dumps and many compare can be used to find it.
I personal and up with a little c++ program that resets the ESP before it opens the serial for debugging.
Mario Mikočević
@mozgy
Dec 27 2015 18:39
@Links2004 ok, noted
Martin Ayotte
@martinayotte
Dec 27 2015 18:40
@niteshpatil004 , if the provided EEPROM emulation is not good enough for your project, you can attache an external I2C EEPROM using the library I've mentioned in the forum, it is quite simple to use, and EEPROM chips are cheap on eBay or AliExpress, and you can get them as big at 128KB (ie: AT24C1024)
Markus
@Links2004
Dec 27 2015 18:40
or use SPIFFS to store a config file, may as json then its easy to use.
niteshpatil004
@niteshpatil004
Dec 27 2015 18:46
my module already has external EEPROM, I am not getting where flashed program is store
Markus
@Links2004
Dec 27 2015 19:09
@niteshpatil004 what do you mean with external EEPROM?
all ESP8266 modules have an external SPI flash, and in there the program + spiffs + emulated eeprom is stored.
https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#flash-layout
Helio Machado
@crushedice2000
Dec 27 2015 19:09

@crushedice2000 my wiring was fine. my fake FTDI must be one of the faker ones. Swapped it for an original FTDI cable and it worked fine. The esptool.py hack with smaller blocks didn't fix it for my piece of chinese sh*t. Lesson learned, too bad it took a couple of days :)

You can buy a CP2012-based adapter cable. They are good for this, also cheap on Ali. And you can try reducing so much the block size on the fake FTDI.

brutzler
@brutzler
Dec 27 2015 19:13
@all: My SPI-LCD (ILI9341) takes me a lot of GPIOs. Does anybody know a GLCD with I2C
Or will this take too long time to write?
Mario Mikočević
@mozgy
Dec 27 2015 19:13
XxY size ?
there are very nice small ones, and it's useable fast
Helio Machado
@crushedice2000
Dec 27 2015 19:14
@brutzler: Maybe MCP23017 as port expander? http://forum.arduino.cc/index.php?topic=52271.0
brutzler
@brutzler
Dec 27 2015 19:14
2-3"??
@mozgy: some proposals?
@crushedice2000: good idea. will look for this.
Mario Mikočević
@mozgy
Dec 27 2015 19:16
don't know atm, I'm mostly using 1.2" OLEDs
brutzler
@brutzler
Dec 27 2015 19:20
I have not the best eyes any more....... ;-)
Mario Mikočević
@mozgy
Dec 27 2015 19:20
hehe, understood
brutzler
@brutzler
Dec 27 2015 19:25
4 postings above ...hehe
niteshpatil004
@niteshpatil004
Dec 27 2015 19:25
@mozgy when we use EEPROM.Write to save wifi configuration data, whether this data is stored / is it in spiffs?
Helio Machado
@crushedice2000
Dec 27 2015 19:26
@niteshpatil004: No, it's stored on the SPI flash, but not on a filesystem. I'm wrong, @mozgy?
Mario Mikočević
@mozgy
Dec 27 2015 19:26
@niteshpatil004
This message was deleted
brutzler
@brutzler
Dec 27 2015 19:27
@mozgy: 1.2" sure? only have seen 1.3"OLEDs
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:27
do you guys generally use breakout boards for your designs, or do you make your own PCBs with bare ESPs?
Mario Mikočević
@mozgy
Dec 27 2015 19:27
no, it's not in SPIFFS
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:27
err
let me fix
Mario Mikočević
@mozgy
Dec 27 2015 19:27
@skorokithakis breadboard 1st then PCB
niteshpatil004
@niteshpatil004
Dec 27 2015 19:28
@mozgy then how to save it permanent even after esp restarts?
Mario Mikočević
@mozgy
Dec 27 2015 19:28
@niteshpatil004 SPIFFS is permanent
Helio Machado
@crushedice2000
Dec 27 2015 19:28
@skorokithakis: Breadboard, then more breadboard, then a breadboard with dupont lines, then soldered breadboard, then CNC milled circuit, then a custom-made PCB, then the final product. :smiling_imp:
niteshpatil004
@niteshpatil004
Dec 27 2015 19:29
@mozgy please share any link where i can find example to save such data
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:29
i mean do you guys use a nodemcu or similar, or just put bare ESPs in your designs?
Mario Mikočević
@mozgy
Dec 27 2015 19:29
@skorokithakis bare esp-01 and esp-12
niteshpatil004
@niteshpatil004
Dec 27 2015 19:30
@mozgy thank u
brutzler
@brutzler
Dec 27 2015 19:30
nodemcu for development and for final
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:30
@mozgy do you have a more-or-less fixed boilerplate you use, such as the three pullup/down resistors, etc?
Helio Machado
@crushedice2000
Dec 27 2015 19:30
@skorokithakis: I was using a nodemcu, until I fried with 200V AC, then ESP-01 with manual reset/flash.
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:30
@crushedice2000 haha, nice
Mario Mikočević
@mozgy
Dec 27 2015 19:30
hehe
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:31
i found that breakout boards are cheap and handy if you're only making one of something and don't want to design the whole thing yourself
e.g. i made a circuit that's a bunch of sensors and outputs, so i just used a nodemcu on headers rather than add the whole shebang of capacitors/resistors/regulators/etc
Mario Mikočević
@mozgy
Dec 27 2015 19:32
@skorokithakis it's five resistors reset, ch_pd, gpio0, gpio2, gpio15
gpio15 pulldown
and on esp-12 two more for gpio4 and gpio5
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:33
what about 4 and 5?
also why 2?
Mario Mikočević
@mozgy
Dec 27 2015 19:33
one each :)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:33
i mean why gpio2?
Mario Mikočević
@mozgy
Dec 27 2015 19:34
I'm using esp-01 for I2C
Helio Machado
@crushedice2000
Dec 27 2015 19:34
@skorokithakis image
Mario Mikočević
@mozgy
Dec 27 2015 19:34
and SMDs are small footprint
Helio Machado
@crushedice2000
Dec 27 2015 19:36
@skorokithakis: So it's not needed.
Mario Mikočević
@mozgy
Dec 27 2015 19:36
@brutzler ty for that OLED link, bookmarked ..
Helio Machado
@crushedice2000
Dec 27 2015 19:36
The only important thing is to pull LOW (GND) GPIO15 and HIGH (3V3) GPIO0
brutzler
@brutzler
Dec 27 2015 19:36
@mozgy : what lib do you use for your OLEDs???
Mario Mikočević
@mozgy
Dec 27 2015 19:36
my own :) /flex :D
Helio Machado
@crushedice2000
Dec 27 2015 19:36
However, is safer to pull it HIGH.
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:37
safer as in, otherwise it might go into flash mode?
Mario Mikočević
@mozgy
Dec 27 2015 19:37
squix78's is the best lib for those OLEDs
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:37
it's ridiculous how many gpios are wasted just puling them up in the boot mode
brutzler
@brutzler
Dec 27 2015 19:38
@mozgy: squix78? member of the board?
Mario Mikočević
@mozgy
Dec 27 2015 19:39
yes that one
brutzler
@brutzler
Dec 27 2015 19:41
But the 2.4" OLED in the link has a "ssd1309" instead of the 1306 in the lib :-(
Mario Mikočević
@mozgy
Dec 27 2015 19:43
yes, one of, I have several
darned things have mixed VCC and GND so they're not interchangeable
brutzler
@brutzler
Dec 27 2015 19:43

from the description:

Driver IC: SSD1306(dl.vmall.com/c0a5f0ybmb) or SH1106(dl.vmall.com/c00sl1fyzc)

can this be a problem, if its a SH1106?

Mario Mikočević
@mozgy
Dec 27 2015 19:45
probably yes
checkout adafruit
brutzler
@brutzler
Dec 27 2015 19:48
adafuit is like pharmacy. little bit expensive
Mario Mikočević
@mozgy
Dec 27 2015 19:48
eh, sorry, I ment their library
brutzler
@brutzler
Dec 27 2015 19:48
ok ;-)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:49
does anybody here know how ASK reception is done at a low level?
brutzler
@brutzler
Dec 27 2015 19:51
anybody tested this one: https://code.google.com/p/u8glib/
niteshpatil004
@niteshpatil004
Dec 27 2015 19:52
@mozgy which platform is better to program esp8266? whether arduino IDE or nodemcu?
Mario Mikočević
@mozgy
Dec 27 2015 19:53
@niteshpatil004 that mostly depends on you, nodemcu is lua, arduino ide is c++
niteshpatil004
@niteshpatil004
Dec 27 2015 19:55
@mozgy do we have spiffs options in nodemcu?
Mario Mikočević
@mozgy
Dec 27 2015 19:55
@niteshpatil004 sorry, don't know
niteshpatil004
@niteshpatil004
Dec 27 2015 19:57
@all do we have spiffs options in nodemcu?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 19:57
messaging 230 people is probably not great
Dmitry Kireev
@kireevco
Dec 27 2015 19:58
lol. just got a notification @niteshpatil004 >:|
@niteshpatil004 my answer is I don't know
Helio Machado
@crushedice2000
Dec 27 2015 20:48

@niteshpatil004: \/

@all do we have spiffs options in nodemcu?

Yes, it has a filesystem.

TL;DR

http://www.nodemcu.com/docs/file-module/

Also, there is a user called @all that won't respond you ;-) Please consider adding a line with this content:
## @@All
Helio Machado
@crushedice2000
Dec 27 2015 20:55
However. I prefer Arduino w/ PlatformIO
msticninja
@msticninja
Dec 27 2015 21:24
Been trying to resolve a compile issue with esp8266/Arduino and the library "Sensirion"(http://playground.arduino.cc/Code/Sensirion#Sensirion). Compile fails with no known conversion in Sensirion.h, line 76. Compiles fine with standard arduino boardtype selected, but not with the Ada Huzzah ESP8266 boardtype. Anybody have any tips?
Ivan Kravets
@ivankravets
Dec 27 2015 22:10
Hey :) Who are ready to try PlatformIO with data uploading to SPIFFS ?
Chris Elsworth
@celsworth
Dec 27 2015 22:36
I would, but I don't use SPIFFS in anything yet :(
Ivan Kravets
@ivankravets
Dec 27 2015 22:41
@celsworth people maybe surprised. I implement these ESP8266 based features for PlatformIO but don't have ESP8266 based board :blush:
How does it look....
(develop)➜  origin git:(develop) ✗ platformio run -d examples/wiring-blink -e nodemcu -t uploadfs --upload-port /dev/null
[Mon Dec 28 00:38:40 2015] Processing nodemcu (platform: espressif, board: nodemcu, framework: arduino, build_flags: -D LED_BUILTIN=BUILTIN_LED)
----------------------------------------------------------------------------------------------------------------------------------------------------------------
"/Users/ikravets/.platformio/packages/tool-mkspiffs/mkspiffs" -c data -p 256 -b 8192 -s 3125248 .pioenvs/nodemcu/spiffs_image.bin
/arm_common_tables.h
/sdf.h
<lambda>(["uploadfs"], [".pioenvs/nodemcu/spiffs_image.bin"])
"/Users/ikravets/.platformio/packages/tool-esptool/esptool" -vv -cd nodemcu -cb 115200 -cp /dev/null -cf .pioenvs/nodemcu/spiffs_image.bin -ca 1076887552
esptool v0.4.6 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from /dev/tty.usbserial to /dev/null
espcomm_upload_file
stat .pioenvs/nodemcu/spiffs_image.bin success
opening port /dev/null at 115200
tcgetattr
tcsetattr
error: setattr stage 1 failed
error: espcomm_open failed
Chris Elsworth
@celsworth
Dec 27 2015 22:44
nice, so it builds the binary out of a directory and uploads that? pretty handy :)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 23:22
what's SPIFFS?
Ivan Kravets
@ivankravets
Dec 27 2015 23:23
:smile:
Let's go! Uploading files to file system SPIFFS using the only 1 command https://github.com/platformio/platformio/issues/382#issuecomment-167447336
Stavros Korokithakis
@skorokithakis
Dec 27 2015 23:26
so you can add files and stuff and flash them on the ESP?
Ivan Kravets
@ivankravets
Dec 27 2015 23:26
Yes
Stavros Korokithakis
@skorokithakis
Dec 27 2015 23:27
that's pretty great
i love platformio
good job
Ivan Kravets
@ivankravets
Dec 27 2015 23:27
Put files to data_dir and run platformio run --target uploadfs.
@skorokithakis could you test it?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 23:29
i don't even know how it works, so i doubt it
brutzler
@brutzler
Dec 27 2015 23:29
Does anybody know something about the sense/use of the DC-signal of an SPI-display ( Ili9341 )
And do I need the MISO signal? What data should come back from the display?
Stavros Korokithakis
@skorokithakis
Dec 27 2015 23:29
i'd run the latest develop to report bugs, but last time that happened i didn't know if they were my bugs or platformio's :P
i need to get this program stable before i can test the new platformio
Stavros Korokithakis
@skorokithakis
Dec 27 2015 23:32
huh, damn, there's a whole filesystem i can use?
that'll save me hardcoding my data
Ivan Kravets
@ivankravets
Dec 27 2015 23:35
yes
Chris Elsworth
@celsworth
Dec 27 2015 23:39
its where the rest of your 4MB flash goes usually ;)
Stavros Korokithakis
@skorokithakis
Dec 27 2015 23:54
yeah, so far i've only used about 300 bytes of it :P
i need to implement some sort of lowpass filter for my ASK receiver, but that's hard