These are chat archives for esp8266/Arduino

28th
Mar 2017
Michael Miller
@Makuna
Mar 28 2017 00:40
@ongvanor I built the library for "remote" control using the Esp and tested it also on an AVR Arduino. The board I had exposed a AREF, use this as the voltage into the resistor array and then you don't need to worry about the voltage.
ongvanor
@ongvanor
Mar 28 2017 00:52
so 3.3v would do fine as an input in the ADC of the esp-12e?
http://forum.arduino.cc/index.php?topic=8558.0 im planning to apply this in the esp-12e using the 3.3v of the esp-12e module
Michael Miller
@Makuna
Mar 28 2017 01:07
@ongvanor Look at what I typed, I stated my board had a AREF. I did not say this was 3.3v. AREF is Analog Reference.
ongvanor
@ongvanor
Mar 28 2017 01:11
sorry dont know what AREF means XD
Tejas H
@CodingCreate101
Mar 28 2017 02:11
That means you need to study data sheet
ongvanor
@ongvanor
Mar 28 2017 02:47
the analog read seems to interrupt the connection
ongvanor
@ongvanor
Mar 28 2017 02:56
ADC_MODE(ADC_VCC); should be added in the sketch right if im going to read voltage in the ADC?
ongvanor
@ongvanor
Mar 28 2017 03:15
can i use GPIO03 and GPIO01 as output?
ongvanor
@ongvanor
Mar 28 2017 03:33
(crossing my fingers hoping that it could be used as output) XD
Nikolas Beutler
@biacz
Mar 28 2017 05:01
guys, any idea if its possible to suppress specific lines or values within arduino when i upload the sketches to github? like adding a certain comment behind or something like that? i really dont want to change the values each time i commit..
ongvanor
@ongvanor
Mar 28 2017 06:28
can i use the GPIO 1 (TX) and GPIO 3 (RX) as a normal digital IO pin?
Clemens Kirchgatterer
@everslick
Mar 28 2017 07:41
@ongvanor yes
@biacz put them in a header file and add it to .gitignore
Nikolas Beutler
@biacz
Mar 28 2017 07:44
@everslick : thanks. so you just include the header file with your passwords and thats it? damn it. how did i not think about that :D
Clemens Kirchgatterer
@everslick
Mar 28 2017 07:45
bonus points, if you manage to have reasonable defaults in your source, that you just 'overide' in the header. so it builds even without it. :-D
hmm, not possible. you can only put defaults in once, then commit them to github, then add them to .gitignore.
Nikolas Beutler
@biacz
Mar 28 2017 07:48
i can add files in advance though. thats something i already did
Clemens Kirchgatterer
@everslick
Mar 28 2017 07:49
i prefere to have a custom Makefile so i can add defines on the commandline. and make can have optional includes (-include) that don't bail out if the file isn't there.
Nikolas Beutler
@biacz
Mar 28 2017 07:56
@everslick i guess thats too much for me. i am using the regular arduino IDE. not even bothering about custom makefiles (yet)
ongvanor
@ongvanor
Mar 28 2017 09:05
@everslick thanks for the input i've been trying to code it but it seems is not working
is there more code should add other than pinMode(1,OUTPUT) or pinMode(3,OUTPUT)
Nikolas Beutler
@biacz
Mar 28 2017 09:15
@ongvanor please always make sure to post your whole code. either via gisthub or through something like pastebin
test
or enclose it with ``` (use shift enter to do multiple lines)
Clemens Kirchgatterer
@everslick
Mar 28 2017 09:33
@ongvanor make sure not to accidentally switching on serial output on those pin, which i think will deactivate OUTPUT.
ongvanor
@ongvanor
Mar 28 2017 11:02
you mean like serial print? hmmm but using the tx and rx wont interrupt the wifi?
Tejas H
@CodingCreate101
Mar 28 2017 15:26
@everslick Thanks for your inputs that day about "don't use strings with EEPROM". Saved lot of time and energy.
Lars Englund
@larsenglund
Mar 28 2017 17:59
Hi, I've never really gotten grip on reading the stack trace after exceptions.. what should I make of this?
It seems to crash randomly but maybe always after a printout in my WiFiEvent-function (WiFi.onEvent(WiFiEvent))
Michael Miller
@Makuna
Mar 28 2017 18:32
Are the wifi event handlers done within an ISR? If so then there are restrictions to what you can call and do within it. I don't remember the details, but in general do as little as you can inside ISRs.
Steve Nelson
@zenmanenergy
Mar 28 2017 23:08
@Makuna Are you talking about these:
WiFi.onStationModeGotIP([&](const WiFiEventStationModeGotIP & evt) {
      Serial.println("[WiFi-event] onStationModeGotIP");
    });
    WiFi.onStationModeConnected([&](const WiFiEventStationModeConnected & evt) {
      Serial.println("[WiFi-event] onStationModeConnected");
    });

    WiFi.onStationModeDisconnected([&](const WiFiEventStationModeDisconnected & evt) {
      Serial.println("[WiFi-event] onStationModeDisconnected");
    });
    WiFi.onSoftAPModeStationConnected([&](const WiFiEventSoftAPModeStationConnected & evt) {
      Serial.println("[WiFi-event] onSoftAPModeStationConnected");
    });

    WiFi.onSoftAPModeStationDisconnected([&](const WiFiEventSoftAPModeStationDisconnected & evt) {
      Serial.println("[WiFi-event] onSoftAPModeStationDisconnected");
    });
Michael Miller
@Makuna
Mar 28 2017 23:53
Yes, you would have to look into what calls those lambdas functions and are they inside an ISR. If they are inside an ISR, you can't call Serial.println.
Incase you don't know, ISR = Interrupt Service Routine