These are chat archives for esp8266/Arduino

13th
Jan 2016
Markus
@Links2004
Jan 13 2016 00:19

@acropup pull down only on 16, and 0-15 have interrupts but some are used for the external flash, so they are hard or impossible to use,
with the arduino port or the SDK you can not run without the flash, but the chip has modes where it not need a flash and then you can use them.
but the hardware/registeres are there.
you can find all pins on the ESP12E for example.

note: I renamed the INPUT_PULLDOWN long time ago to INPUT_PULLDOWN_16 to stop the misunderstanding.

Shane Burgess
@acropup
Jan 13 2016 00:38
oh is there an separate flash IC under the metal cover? thank you for sharing! I will see if I can update the wiki to reflect pulldowns.
This message was deleted
Shane Burgess
@acropup
Jan 13 2016 00:51
I was working with interrupts to make Paul's Rotary Encoder library compatible with the ESP8266. One of the requirements is to define CORE_INT#_PIN values for all pins that support interrupts. That can either be defined in the ESP8266 codebase (probably in pins_arduino.h), or directly in the Encoder library:
https://github.com/PaulStoffregen/Encoder/blob/master/utility/interrupt_pins.h
Do you have a recommendation as to where these definitions belong?
Michael Wheeler
@TheSkorm
Jan 13 2016 02:52
I saw in #1102 that SDK 1.5.1 is out and has wifi_station_set_username. I can see wifi_station_set_username when I do strings ../lib/libwpa2.a however I don't see it in any .h files - is this normal? Secondly do you think that set_username is all that is required to perform username/password authentication to WPA2 Enterprise networks. Finally how do I got about updating to 1.5.1 - do I just copy all the lib/ld/include files and hope for the best?
Markus
@Links2004
Jan 13 2016 03:19
@acropup there is a macro that converts pin nummer to irq digitalPinToInterrupt
but its simple irq 0 = gpio0 .....
tzapu
@tzapu
Jan 13 2016 06:07
@crushedice2000 yw, thanks for letting me know
ulflan
@ulflan
Jan 13 2016 07:02
Hi! I need to use the baud rate 50 bit /second. (In order to hook up and print data on an old TTY.) I guess one can’t use AT-commands to select this odd low baud rate? But can one flash my some instructions to sp8266 in order to transmit data using the built in UART or is 50 bit/s too slow?
Michael Wheeler
@TheSkorm
Jan 13 2016 07:19
@ulflan software serial can go that slow
ulflan
@ulflan
Jan 13 2016 07:26
Any hint about how to set up a such low baud rate?
tzapu
@tzapu
Jan 13 2016 07:28
@Links2004 latest github seems to have stopped ESP8266WebServer working, there seems only one comit pertinent to it e8d60be62a9b08457bed597d721ff44afa57de67
and there might be a typo in _contentLength
Michael Wheeler
@TheSkorm
Jan 13 2016 07:32
@ulflan https://www.arduino.cc/en/Tutorial/SoftwareSerialExample - should be able to set what every baud rate you want in there by memory
ulflan
@ulflan
Jan 13 2016 07:37
For some microcontrolers there is a register that one can assign a factor used to divide a clock and that limits to minimum baudrate since the factor has a maximen value . I would like to know if it is the same with ESP8266 before I buy one.
Michael Wheeler
@TheSkorm
Jan 13 2016 07:56
The AT command refernce for it lists 110 as the min but you can use a different external clock which could get you closer to 50. And the SDK uart.h goes down to BIT_RATE_300
but at that slow software serial would be fine
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:05
@martinayotte @celsworth it's... beautiful :') https://www.dropbox.com/sh/grrwphrucfslook/AABbPqKSp-UEzl3E9j_3dvQDa?dl=0
and, apparently, impossible to cut
wtf
Markus
@Links2004
Jan 13 2016 11:07
@ulflan the hardware uart store the baud rate as div to the clock (80Mhz) as 32bit so 50Baud are possible (in theory)
using the current soft Uart is not possible one byte needs 200ms that is to long for soft Uart like it is today since it block the during seeding one byte.
but its easy to implemant one if needed by this low rate a for with delay will do the jop.
@skorokithakis looks good, cutting a pcb is easy, using a box cutter a metal ruler (or anything with straight edge)
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:10
@Links2004 dude i've been trying for ten minutes, this thing is impossible :P
it's 1.6mm
so it's thick
Markus
@Links2004
Jan 13 2016 11:10
no need to cut it down fully
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:11
it won't break either :(
Markus
@Links2004
Jan 13 2016 11:12
i never have seen a PCB that is not broken after some cutting at both sides and using a vice.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:12
oh, both sides
let me try that
bah, it broke super unevenly :/
i hope it still works
Markus
@Links2004
Jan 13 2016 11:13
in worst case you can use a jigsaw (not sure if that the right name)
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:13
hmm
Markus
@Links2004
Jan 13 2016 11:13
or a dremel
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:14
my dad has all these tools, unfortunately all i have here is a swiss army knife
and apparently this pcb is made of titanium
Markus
@Links2004
Jan 13 2016 11:14
jigsaw: a
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:15
ah, yes
i'll do this pcb by hand just to try it
and the next ones i'll probably bandsaw
i thought they would come pre-cut from the fab
but no
Harrison Mclean
@h4rm0n1c
Jan 13 2016 11:16
I just score mine repeatedly with a really sharp knife. Or use a really old sturdy paper guillotine, I swear this thing could cut phone books...
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:16
haha
what thickness are yours?
Markus
@Links2004
Jan 13 2016 11:16
have you send them a combined gerber?
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:16
yes
Harrison Mclean
@h4rm0n1c
Jan 13 2016 11:16
1.6 from dirty iirc
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:17
hmm, same as mine
dirty do 1.2 by default, mind you
Harrison Mclean
@h4rm0n1c
Jan 13 2016 11:18
That's weird, maybe they changed it, when I load the site 1.6 is def the default...
Markus
@Links2004
Jan 13 2016 11:18
i have here 1.8 and simple cutting at both sides 3-5 times and then thy broke just fine.
a
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:18
1.2mm default for me
@Links2004 oh that's fantastic, i should get that
that'll do the job easily
damn, how do you get the smd resistors out of their strips?
Markus
@Links2004
Jan 13 2016 11:23
like tape
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:23
yeah
wait
Harrison Mclean
@h4rm0n1c
Jan 13 2016 11:24
peel off the cover and use tweezers would be my guess
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:24
do i peel off one end?
oh
thanks
tzapu
@tzapu
Jan 13 2016 11:24

@Links2004 in case you ve missed it , and because you are here :P

latest github seems to have stopped ESP8266WebServer working, there seems only one comit pertinent to it e8d60be62a9b08457bed597d721ff44afa57de67
and there might be a typo in _contentLength

Markus
@Links2004
Jan 13 2016 11:25
will take a look after lunch
tzapu
@tzapu
Jan 13 2016 11:25
bon apetit
and thanks
Stavros Korokithakis
@skorokithakis
Jan 13 2016 11:51
this PCB is working
this is fantastic
i am so psyched
tzapu
@tzapu
Jan 13 2016 11:56
:D
how long did it take to get it?
also, does it deliver any bacon yet?
Markus
@Links2004
Jan 13 2016 11:57

@tzapu have test the webserver with:

    server.on("/", []() {
        USE_SERIAL.printf("[WebServer] send Index\n");
        server.send(200, "text/html", "<html><head><script>var connection = new WebSocket('ws://'+location.hostname+':81/', ['arduino']);connection.onopen = function () {  connection.send('Connect ' + new Date()); }; connection.onerror = function (error) {    console.log('WebSocket Error ', error);};connection.onmessage = function (e) {  console.log('Server: ', e.data);};function sendRGB() {  var r = parseInt(document.getElementById('r').value).toString(16);  var g = parseInt(document.getElementById('g').value).toString(16);  var b = parseInt(document.getElementById('b').value).toString(16);  if(r.length < 2) { r = '0' + r; }   if(g.length < 2) { g = '0' + g; }   if(b.length < 2) { b = '0' + b; }   var rgb = '#'+r+g+b;    console.log('RGB: ' + rgb); connection.send(rgb); }</script></head><body>LED Control:<br/><br/>R: <input id=\"r\" type=\"range\" min=\"0\" max=\"255\" step=\"1\" onchange=\"sendRGB();\" /><br/>G: <input id=\"g\" type=\"range\" min=\"0\" max=\"255\" step=\"1\" onchange=\"sendRGB();\" /><br/>B: <input id=\"b\" type=\"range\" min=\"0\" max=\"255\" step=\"1\" onchange=\"sendRGB();\" /><br/></body></html>");
        USE_SERIAL.printf("[WebServer] send Index Done.\n");
    });

and it is working, have you a case/example where it not work?

tzapu
@tzapu
Jan 13 2016 11:58
@Links2004 did not test directly with just a http server, but with wifimanager lib, but
one sec
this is what another user reported
tzapu/WiFiManager#58
maybe it is dieing on the redirect
i rolled back the esp8266 core to before the comit i mentioned earlier and it started working again
    if (_contentLength == CONTENT_LENGTH_NOT_SET) {
        sendHeader("Content-Length", String(contentLength));
    } else if (_contentLength != CONTENT_LENGTH_UNKNOWN) {
        sendHeader("Content-Length", String(_contentLength));
    }
    sendHeader("Connection", "close");
    sendHeader("Access-Control-Allow-Origin", "*");
that s the comit, should String(contentLength)) not be String(_contentLength))
? did not look through the whole lib
but if the if is referencing _contentLenght ..
Markus
@Links2004
Jan 13 2016 12:03
not see a problem here. ? _contentLenght stored the value from setContentLength and is for overwriting
tzapu
@tzapu
Jan 13 2016 12:04
true, just looked myself
Markus
@Links2004
Jan 13 2016 12:04
as long it is not set it will use contentLength, if it is set it will use _contentLenght.
contentLength may is 0 when there is no content
tzapu
@tzapu
Jan 13 2016 12:05
hmm, i should try again with a nodemcu and try to get debug as well (last tried on a wemo, no debug menu)
Markus
@Links2004
Jan 13 2016 12:05
all boards run with generic :)
you only need to set all stuff right
tzapu
@tzapu
Jan 13 2016 12:06
yeah, i think auto reset didn t want to work with generic, or maybe the baud...
will try
Markus
@Links2004
Jan 13 2016 12:06
you can set the reset mode
tzapu
@tzapu
Jan 13 2016 12:06
i know, i probbaly messsed with more settings at once and missed the right one
Markus
@Links2004
Jan 13 2016 12:07
d1_mini.upload.resetmethod=nodemcu
ck is default for generic
tzapu
@tzapu
Jan 13 2016 12:11
thanks
so, with latest master
[AP] softap config unchanged
*WM: AP IP address: 
*WM: 192.168.4.1
*WM: HTTP server started
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 7
wifi evt: 5
wifi evt: 7
wifi evt: 7
New client
method: GET url: /hotspot-detect.html search: 
headerName: Host
headerValue: captive.apple.com
headerName: Connection
headerValue: close
headerName: User-Agent
headerValue: CaptiveNetworkSupport-325.10.1 wispr
args: 
Request: /hotspot-detect.html
 Arguments: 
request handler not found
*WM: Request redirected to captive portal
New client
method: GET url: / search: 
headerName: Host
headerValue: 192.168.4.1
headerName: Connection
headerValue: close
headerName: User-Agent
headerValue: CaptiveNetworkSupport-325.10.1 wispr
args: 
Request: /
 Arguments: 
*WM: Handle root
wifi evt: 7
those requests don t seem to give back the right answer or something as the captive page doesn t open
pre that comit, all fine
also requesting the page directly, per IP
gives back an empty page
i m using server->sendContent(head);
server->sendContent_P(HTTP_SCRIPT);
to send data back if it matters
rolling back 23 commits now to make sure it works
and works, no more blank pages
tzapu
@tzapu
Jan 13 2016 12:17
and that s the only comit out of those 23 pertinent to web server
Stavros Korokithakis
@skorokithakis
Jan 13 2016 12:19
@tzapu 25 days, and it does!
tzapu
@tzapu
Jan 13 2016 12:22
@skorokithakis i d get so fat after building one of those...needs some cooldown between bacon deliveries...
@Links2004 furthermore, checking out latest master and reverting just that change to web server also makes it work ok
Stavros Korokithakis
@skorokithakis
Jan 13 2016 12:22
@tzapu haha, yep, i'm adding the rate-limiting now
tzapu
@tzapu
Jan 13 2016 12:23
i have no clue why this would be happening, just doing the leg work in confirming that something there does not sit right, at least with how i have the library setup
bacon wrapped grilled feta cheese...mmmmm, now that would be a button worth having
now i m hungry :(
Stavros Korokithakis
@skorokithakis
Jan 13 2016 13:03
haha
Chris Elsworth
@celsworth
Jan 13 2016 13:11
@skorokithakis nice pcb! :) nice silk too, I like the dark colour :)
Stavros Korokithakis
@skorokithakis
Jan 13 2016 13:11
thank you! yeah, i love it
dirtypcbs really delivered
Chris Elsworth
@celsworth
Jan 13 2016 13:12
quite fast too?
hasn't been too long has it
Stavros Korokithakis
@skorokithakis
Jan 13 2016 13:16
it's been 25 days
let me check, actually
hmm, their site is down
Stavros Korokithakis
@skorokithakis
Jan 13 2016 13:27
@celsworth looks like it's been 15 days since they shipped
pretty fast!
Chris Elsworth
@celsworth
Jan 13 2016 13:27
that is good :)
Stavros Korokithakis
@skorokithakis
Jan 13 2016 13:30
it's great
now i can make my wifi LED strip controller
and light my entire house up
beikeland
@beikeland
Jan 13 2016 13:33
@skorokithakis be carefull of that 240v stuff, maybe the whole house doesn't light up ;) :P
Stavros Korokithakis
@skorokithakis
Jan 13 2016 13:42
@beikeland nah, it'll be 12v
beikeland
@beikeland
Jan 13 2016 13:50
speaking of 12V; any suggestions for the cheapest way to turn +12V into +/-12V (or 240v to +/- 12V)? I can't seem to find anything for less than about $8
(i'll be looking at a diy thing with ICL7660A once i get them, but ready built modules would be awesome)
Ivan Kravets
@ivankravets
Jan 13 2016 13:55
Dear PlatformIO's users, PlatformIO is nominated for the year's best Software and Tools in the 2015/16 #IoT Awards 🏆 Please join the voting (bottom of page) http://iotawards.postscapes.com/2015-16/best-iot-software-and-tools
Markus
@Links2004
Jan 13 2016 13:57
@beikeland old ATX power supply have -12V, but for what do you need -12V?
Stavros Korokithakis
@skorokithakis
Jan 13 2016 13:57
@ivankravets voted!
beikeland
@beikeland
Jan 13 2016 14:00
@Links2004 for generating the pilot signal for charging electic cars, its +/- 12V pwm. So want a compact solution, capable of around 20-30mA. The ICL7660A might do the job, but i wanted something ready built to start testing with.
But i should have some old atx stuff, won't be compact, but should work for now. Thanks :)
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:03
@beikeland two MOSFETs?
Ivan Kravets
@ivankravets
Jan 13 2016 14:04
@skorokithakis thanks a lot!
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:06
is there any way to get the ESP to associate to the wifi faster?
beikeland
@beikeland
Jan 13 2016 14:06
an opamp or 4 transistors; will go for the most compact thing
Markus
@Links2004
Jan 13 2016 14:07
@skorokithakis preset channel and using static ip
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:15
@Links2004 sounds great, would you happen to know of any sample code?
Markus
@Links2004
Jan 13 2016 14:17
you only need WiFi.config and WiFi.begin
wl_status_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = (uint32_t)0x00000000, IPAddress dns2 = (uint32_t)0x00000000);
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:18
@Links2004 fantastic, thank you
hmm, will setting an invalid channel cause it to not connect at all, or just to be slower?
FWeinb
@FWeinb
Jan 13 2016 14:20
With just the ssid and the passphrase and a fixed IP i get connected in < 200ms
Markus
@Links2004
Jan 13 2016 14:20
invalid channel < 1 and > 13 are ignored, if the AP is on a other channel then set it will be slower as when you set it correct but the speed is the same as not setting it.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:21
thanks, i'll just set it to 6
Markus
@Links2004
Jan 13 2016 14:22
setting bssid is make it a bit faster too.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:22
@FWeinb ah, the fixed IP will do the trick, then, can you share your code?
@Links2004 for the bssid i need to convert the mac address to decimal?
Markus
@Links2004
Jan 13 2016 14:23
no c array {0x00 ..... }
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:23
ah, thanks
FWeinb
@FWeinb
Jan 13 2016 14:24
WiFi.config ({192, 168, 178, 33}, {192, 168, 178, 1}, {255, 255, 255, 0}, {192, 168, 178, 1});
WiFi.begin ( ssid, password );
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:25
@FWeinb thank you
hmm, where did i go wrong?
    WiFi.begin(ssid, password, 6, {0xe4, 0xf4, 0xc6, 0x0a, 0xf3, 0x8c});
FWeinb
@FWeinb
Jan 13 2016 14:37
No idea...
Helio Machado
@0x2b3bfa0
Jan 13 2016 14:37
@ivankravets: Voted up! However, I'm seeing that this poll is not representative. Is there any well made poll? I'll vote twice for PlatformIO ;)
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:37
@crushedice2000 yeah, what is that netvines thing? all i found is a social network dashboard
Helio Machado
@0x2b3bfa0
Jan 13 2016 14:38
@ivankravets Now I'm busy with a ESP project, however I've not forget the debian packaging.
@skorokithakis: This poll seems not good.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:39
yeah :/
@crushedice2000 would you happen to know why my array above isn't working?
Helio Machado
@0x2b3bfa0
Jan 13 2016 14:40
@skorokithakis: What is surprising is to find a 0% of votes on Snappy Ubuntu Core.
@skorokithakis: Looking...
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:40
@crushedice2000 hmm, i haven't heard of that, let me check it out
oh wow
that looks fantastic
i need to install that and play with it
looks like the ESP takes one second from wakeup to mqtt publishing
that's very nice
Helio Machado
@0x2b3bfa0
Jan 13 2016 14:45
@skorokithakis: What fail do you get with your last command?
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:45
looks like i need to cast it?
FWeinb
@FWeinb
Jan 13 2016 14:47
i had success with defining it like this:
uint8_t bssid[] = {0xe4, 0xf4, 0xc6, 0x0a, 0xf3, 0x8c}
But doing that is significant slower than just the ssid.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:49
really? it connects more slowly?
Helio Machado
@0x2b3bfa0
Jan 13 2016 14:50
@skorokithakis: I'm not good at C/++. However I would try this:
WiFi.begin(ssid, password, 6, (uint8_t []){0xe4, 0xf4, 0xc6, 0x0a, 0xf3, 0x8c});
FWeinb
@FWeinb
Jan 13 2016 14:50
Yeah. > 10s
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:51
@FWeinb wow
@crushedice2000 looks like that'd work, thanks!
i'll try it
this should be better:
memcpy((void *) &conf.bssid[0], (void *) bssid, 6 * sizeof(uint8_t));
Stavros Korokithakis
@skorokithakis
Jan 13 2016 14:54
ah, thanks
FWeinb
@FWeinb
Jan 13 2016 14:56
That isn't helping either...
Helio Machado
@0x2b3bfa0
Jan 13 2016 15:06
@ivankravets: I have a little problem with your PlatformIO:
src/tmp_ino_to.cpp:28:8: error: previous declaration of 'void __run_user_rf_pre_init()' with 'C++' linkage void __run_user_rf_pre_init(void);
This message was deleted
@ivankravets: Why can't I define that function?
The code:
extern "C" {
  #include "user_interface.h"
  void __run_user_rf_pre_init(void) {
    uint8_t mac[] = MACADDR;
    system_phy_set_max_tpw(TXPOWER);
    wifi_set_phy_mode(PHY_MODE_11G);
    wifi_set_macaddr(SOFTAP_IF, &mac[0]);
  }
}
Markus
@Links2004
Jan 13 2016 15:14
@FWeinb 6 * sizeof(uint8_t) is the same as 6. uint8_t have always 1 byte on any platform
FWeinb
@FWeinb
Jan 13 2016 15:24
Okay. But why is it taking >10s with the BSSID defined?
Stavros Korokithakis
@skorokithakis
Jan 13 2016 15:29
@Links2004 how much speedup do you think one would see with the bssid set?
Markus
@Links2004
Jan 13 2016 15:31
if espressif done it in a good way they not eaven need to scan if they get ssid + pw + ch + bssid so it shut be dam fast.
but i never test it, so may the make it bad like the most stuff.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 15:32
ah hm
Ivan Kravets
@ivankravets
Jan 13 2016 16:20

@crushedice2000

Voted up!

Thanks a lot!

However, I'm seeing that this poll is not representative. Is there any well made poll? I'll vote twice for PlatformIO

You can create own :) We don't have alternatives.

@crushedice2000

Now I'm busy with a ESP project, however I've not forget the debian packaging.

We are working on own PlatformIO IDE. I hope that will not be ability to install PlatformIO CLI manually via package managers, other hooks. PlatformIO CLI will be a part of PlatformIO IDE. You will have ability within IDE to "Install PlatformIO command line tool" globally.

Helio Machado
@0x2b3bfa0
Jan 13 2016 16:23
@ivankravets: Awesome! How will it be?
Ivan Kravets
@ivankravets
Jan 13 2016 16:24
As the practice has shown, users don't like to play with terminals, project generators and etc.
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:24
@ivankravets: Then I'm not a user! :smiling_imp:
Ivan Kravets
@ivankravets
Jan 13 2016 16:24
:))))
I've missed "most users" :)
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:25
@ivankravets: Ok, :smile_cat:
Ivan Kravets
@ivankravets
Jan 13 2016 16:25
It should be like: download and code!
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:25
@ivankravets: How the IDE will be? Atom-like?
Ivan Kravets
@ivankravets
Jan 13 2016 16:25
aaaa, sorry
Yes, it will be based on Atom IDE
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:26
:+1: Really awesome! Expecting... I can act as beta tester, also as minor bug fixer.
Ivan Kravets
@ivankravets
Jan 13 2016 16:26
Code completion, GUI for PlatformIO commands, built in serial monitor, built-in terminal
If you like to work with terminal, you will have ability within IDE to type commands
tzapu
@tzapu
Jan 13 2016 16:27
@ivankravets atom is killing me at times, something related to auto completion and markdown, either one of them, or both together, it simply starts lagging behind like some crappy microsoft software from the 9ties
Ivan Kravets
@ivankravets
Jan 13 2016 16:28
@tzapu which IDE/Text editor do you use?
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:28
@tzapu: Atom works well for me!
Ivan Kravets
@ivankravets
Jan 13 2016 16:28
We don't have a lot of candidates.
Sublime Text users will have GUI for PlatformIO via https://github.com/gepd/Deviot
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:29
@ivankravets: Did you read this? Can you say me why this happens?
@ivankravets: What about Lime text?
Ivan Kravets
@ivankravets
Jan 13 2016 16:29
Eclipse users also will have GUI for PlatformIO (someone works on it)
@crushedice2000 could you open an issue with it with project example? https://github.com/platformio/platformio/issues
As for me, I prefer VIM. However, Atom is good compromise between simple Arduino/Processing IDE and complicated Eclipse IDE.
tzapu
@tzapu
Jan 13 2016 16:32
@ivankravets just used atom for markdown and minor edits of files. big long lasting issue about this on their github, added my data today actually
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:32
@ivankravets Eclipse gives me urticaria.
Ivan Kravets
@ivankravets
Jan 13 2016 16:32
@tzapu which is your OS? Atom version?
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:33
@ivankravets: Opening the issue. I'll send you the link.
tzapu
@tzapu
Jan 13 2016 16:33
os x, 1.3.3 i think
latest everything
Ivan Kravets
@ivankravets
Jan 13 2016 16:33
hm, do you have external packages installed?
tzapu
@tzapu
Jan 13 2016 16:33
neah, does it in safe mode as well
don t worry about it, added my profile to the issue, and everything, hopefully they ll crack it
Ivan Kravets
@ivankravets
Jan 13 2016 16:34
@tzapu try to remove ~/.atom
tzapu
@tzapu
Jan 13 2016 16:34
ok, will try to, thanks
Ivan Kravets
@ivankravets
Jan 13 2016 16:34
and reinstall Atom
this is the kind of stuff
Ivan Kravets
@ivankravets
Jan 13 2016 16:35
WOW
tzapu
@tzapu
Jan 13 2016 16:35
:)
Ivan Kravets
@ivankravets
Jan 13 2016 16:35
try to remove it totally from system with related files and configs and use clean version
tzapu
@tzapu
Jan 13 2016 16:35
will do, thanks
Helio Machado
@0x2b3bfa0
Jan 13 2016 16:43
@ivankravets: platformio/platformio#455
Please notify me if needs rewording.
tzapu
@tzapu
Jan 13 2016 16:50
voted as well, not a very nice site :P
also, blynk and platformio are not comparable, don t do the same thing at all, how could you compare...
Ivan Kravets
@ivankravets
Jan 13 2016 16:59
@tzapu Thanks! I agree with you. I don't know what does Blynk do in IoT development tools section :)
bidyutper
@bidyutper
Jan 13 2016 17:05
how to control ac fan speed esp circuit? mqtt control anyone plz help.
Helio Machado
@0x2b3bfa0
Jan 13 2016 17:05
@bydupter: AC dimming with ESP seems not possible while using WiFi. @/all: I'm wrong?
Markus
@Links2004
Jan 13 2016 17:08
@crushedice2000 yes the WiFi interrupts can delay the zero crossing IRQ, no good idea.
using a tiny or atmega + esp is more stable.
Helio Machado
@0x2b3bfa0
Jan 13 2016 17:09
@Links2004: Thanks for the explanation!
bidyutper
@bidyutper
Jan 13 2016 17:10
@Links2004 any gud example?
Helio Machado
@0x2b3bfa0
Jan 13 2016 17:10
@bidyutper: As @Links2004 said, you could use an attiny along with the ESP to do the dimming.
bidyutper
@bidyutper
Jan 13 2016 17:10
reference
Helio Machado
@0x2b3bfa0
Jan 13 2016 17:10
You could send the PWM values from the ESP to the Arduino/Attiny with i2c using GPIO0 and GPIO2.
Markus
@Links2004
Jan 13 2016 17:12
you can simple the most dimmers by using a soled state relay with zero crossing off (its basically a triac + optocopler fully integrated)
can i use mqtt in above ckt usin esp in arduino programmin
Mario Mikočević
@mozgy
Jan 13 2016 17:20
@skorokithakis nice looking PCB
to bad there are no round corners ;)
bidyutper
@bidyutper
Jan 13 2016 17:25
?
@crushedice2000 thx for your replay...but I m thinkin about circuit should be as small as possible..
Markus
@Links2004
Jan 13 2016 17:28
you only need a SSR and a phase detection, how many watt you want control?
bidyutper
@bidyutper
Jan 13 2016 17:29
120 watt
induction load
that can replace the triac with all the components around.
for dimming you only need a additional zero crossing detection.
like this:

software for AVR:

int AC_LOAD = 3;    // Output to Opto Triac pin
int dimming = 128;  // Dimming level (0-128)  0 = ON, 128 = OFF

void setup()
{
  pinMode(AC_LOAD, OUTPUT);// Set AC Load pin as output
  attachInterrupt(0, zero_crosss_int, RISING);  // Choose the zero cross interrupt # from the table above
}

//the interrupt function must take no parameters and return nothing
void zero_crosss_int()  //function to be fired at the zero crossing to dim the light
{
  // Firing angle calculation : 1 full 50Hz wave =1/50=20ms 
  // Every zerocrossing thus: (50Hz)-> 10ms (1/2 Cycle) 
  // For 60Hz => 8.33ms (10.000/120)
  // 10ms=10000us
  // (10000us - 10us) / 128 = 75 (Approx) For 60Hz =>65

  int dimtime = (75*dimming);    // For 60Hz =>65    
  delayMicroseconds(dimtime);    // Wait till firing the TRIAC
  digitalWrite(AC_LOAD, HIGH);   // Fire the TRIAC
  delayMicroseconds(10);         // triac On propogation delay (for 60Hz use 8.33)
  digitalWrite(AC_LOAD, LOW);    // No longer trigger the TRIAC (the next zero crossing will swith it off) TRIAC
}

void loop()  {
  for (int i=5; i <= 128; i++){
    dimming=i;
    delay(10);
   }
}

from: http://alfadex.com/2014/02/dimming-230v-ac-with-arduino-2/
you only need to add a serial interface to the esp and you are done.

bidyutper
@bidyutper
Jan 13 2016 17:40
i dont know how to serial interface with esp with a microcontroller i2c ths term is new to me let me try first....
@Links2004 thx
Helio Machado
@0x2b3bfa0
Jan 13 2016 17:50
@bidyutper @Links2004:
#include <Wire.h>

int AC_LOAD = 3;    // Output to Opto Triac pin
int dimming = 128;  // Dimming level (0-128)  0 = ON, 128 = OFF

void receiveEvent(int length)
{
  while(Wire.available() > 0)
  {
    dimming = Wire.read();
  }
}

void setup()
{
  pinMode(AC_LOAD, OUTPUT);// Set AC Load pin as output
  attachInterrupt(0, zero_crosss_int, RISING);  // Choose the zero cross interrupt # from the table above
  Wire.begin(4);  // join i2c bus with address #4 (put your ESP i2c address here)
  Wire.onReceive(receiveEvent); // register event
}

//the interrupt function must take no parameters and return nothing
void zero_crosss_int()  //function to be fired at the zero crossing to dim the light
{
  // Firing angle calculation : 1 full 50Hz wave =1/50=20ms 
  // Every zerocrossing thus: (50Hz)-> 10ms (1/2 Cycle) 
  // For 60Hz => 8.33ms (10.000/120)
  // 10ms=10000us
  // (10000us - 10us) / 128 = 75 (Approx) For 60Hz =>65

  int dimtime = (75*dimming);    // For 60Hz =>65    
  delayMicroseconds(dimtime);    // Wait till firing the TRIAC
  digitalWrite(AC_LOAD, HIGH);   // Fire the TRIAC
  delayMicroseconds(10);         // triac On propogation delay (for 60Hz use 8.33)
  digitalWrite(AC_LOAD, LOW);    // No longer trigger the TRIAC (the next zero crossing will swith it off) TRIAC
}

void loop()  {
  delay(100);
}
Going offline, see you soon
Helio Machado
@0x2b3bfa0
Jan 13 2016 18:26
@Links2004: Only a question: The dimmable switching led driver I bought get very hot when working. Is that bad?
Markus
@Links2004
Jan 13 2016 18:28
@crushedice2000 its properly the the strange HCD output. try to remove R5, be careful may very hot.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 21:55
@mozgy that was my first pcb, that's why :P
@crushedice2000 what are you guys discussing?
also, where do you guys stand on the "breakout boards vs raw ESPs for PCBs" debate?
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:00
@skorokithakis: what discussion? I was talking so much!
Do you refer to the latest message with Markus?
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:06
@crushedice2000 yeah, about the LED
Markus
@Links2004
Jan 13 2016 22:07
BP2818.fw.png
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:07
damn, that's a lot of resistors
what's that?
Markus
@Links2004
Jan 13 2016 22:08
a constant current power supply
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:08
oh huh
Markus
@Links2004
Jan 13 2016 22:08
normal its connected to an AC dimmer
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:08
@skorokithakis: This chat is awesome! The only huge lack it has is that we can't search on the archives.
Markus
@Links2004
Jan 13 2016 22:08
some mods later its controlled by a ESP
@crushedice2000 there is a search ?
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:09
@Links2004 explains well what I want.
Markus
@Links2004
Jan 13 2016 22:09
blob
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:09
@Links2004 no search, sorry. Only walking trough days.
I mean into the archive.
Markus
@Links2004
Jan 13 2016 22:10
the search search in the archive too
@skorokithakis its for LEDs
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:11
@Links2004: oh! I never found nothing in that search box!
@Links2004 hooray! It seems to work well now!
Sure that i was doing something silly!
mrbubble62
@mrbubble62
Jan 13 2016 22:14
#
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:15
@Links2004 i'm also building a LED driver with an ESP
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:15
@mrbubble62 #?
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:15
why do you need constant current?
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:16
@skorokithakis to avoid led frying. Im wrong?
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:16
hmm, i just let my LEDs draw as much as they want, i don't think the controller limits the current
Markus
@Links2004
Jan 13 2016 22:16
i use 12V and WS2812/11 LEDs, but @crushedice2000 has a ~60V led lamp.
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:16
no, i have a 5050 strip
12V, 60W
Markus
@Links2004
Jan 13 2016 22:16
c&p error :)
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:17
@skorokithakis mine is 18W 300mA ~78V
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:17
oh hum
Markus
@Links2004
Jan 13 2016 22:18
they not run on stable voltage, and constant current power supply can not by "PWMed" with a Mos.
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:19
@Links2004: your mod works well. Only that is a bit hot. But it works like a charm!
Stavros Korokithakis
@skorokithakis
Jan 13 2016 22:19
@Links2004 whaaat, why can't it be PWMed?
oh sorry
you said constant current
yes
Markus
@Links2004
Jan 13 2016 22:20
have you removed R5 ? i think its usless in your case and its the one getting hot.
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:20
@Links2004: I'm wrong or R5 is to simulate a load when the duty cycle is not 100%
I haven't removed it (yet)
Markus
@Links2004
Jan 13 2016 22:21
yes, it is but you have no AC dimmer behind that need this, it connected direct to the grid or may a normal switch or?
Helio Machado
@0x2b3bfa0
Jan 13 2016 22:22
@Links2004 connected to a plug that is placed in the wall of my home :smiling_imp:
@/(non-spamming)all: nn
Markus
@Links2004
Jan 13 2016 22:24
you convert ~12W to heat, the LED lamp with the worst efficiency ever :P
0xPIT
@0xPIT
Jan 13 2016 23:09
Hello! I try to store some config to the ESP flash using SPIFFS (i'm on the current master branch). I can not open an existing file for writing. My code either excepts or fs.open(...) returns false. Interrupts are disabled. Any hints? The example (configfile.ino) works, of course...
Martin Ayotte
@martinayotte
Jan 13 2016 23:38
You need to use SPIFFS.begin() along with File f = SPIFFS.open(filename, "w"); which returns file handle for f.write("something");
0xPIT
@0xPIT
Jan 13 2016 23:51
thank. I have that.
my code is like this:
  File fd = SPIFFS.open(configFile, "w");
  if (!fd) {
    Serial.println("Failed to open config file for writing");
    return false;
  }

  Serial.println("opened");

  pidParam.checksum = crc8((uint8_t *)&pidParam, sizeof(PID_t) - sizeof(uint8_t));

  Serial.println("checksummed");

  size_t written = fd.write((uint8_t *)&pidParam, sizeof(PID_t));

  Serial.print("wrote "); Serial.println(written);

  Serial.println("flusing...");
  fd.flush();
  Serial.println("closing...");
  fd.close();
  Serial.println("closed");
plus, there is InterruptLock lock; in that function to disable interrupts.
Martin Ayotte
@martinayotte
Jan 13 2016 23:53
But do you have the SPIFFS.begin() before that ?
0xPIT
@0xPIT
Jan 13 2016 23:54
yes, begin() is in setup()
Martin Ayotte
@martinayotte
Jan 13 2016 23:56
Strange ... which ArduinoESP version you are using ? Personally, I have 2.1.0-rc1 and it is working without troubles.
0xPIT
@0xPIT
Jan 13 2016 23:56
i use master.
git pull like 30mins ago.
the demo in the ESP folder works, too.
Martin Ayotte
@martinayotte
Jan 13 2016 23:59
The ConfigFile.ino example ?
0xPIT
@0xPIT
Jan 13 2016 23:59

```saving file...
opened
checksummed
wrote 32
flusing...

Exception (0):
epc1=0x40206c74 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont
sp: 3ffefbb0 end: 3fff0340 offset: 01a0```