These are chat archives for esp8266/Arduino

20th
Aug 2016
Martin Ayotte
@martinayotte
Aug 20 2016 00:32
@skorokithakis , large one is for power reserve to avoid current spikes, small one is for noise filtering.
Stavros Korokithakis
@skorokithakis
Aug 20 2016 00:32
ah, and they both need to be connected in parallel?
Martin Ayotte
@martinayotte
Aug 20 2016 00:32
Yes !
Stavros Korokithakis
@skorokithakis
Aug 20 2016 00:32
i see, thank you
Martin Ayotte
@martinayotte
Aug 20 2016 00:32
welcome
Stavros Korokithakis
@skorokithakis
Aug 20 2016 00:34
can anyone decipher the connections in this 3.5mm headphone jack? i can't understand the order: http://hongsenele.com/UpLoadPic/PJ-320L-.jpg
i think 5 is gnd, and 2 is microphone?
aug2uag
@aug2uag
Aug 20 2016 00:48
Screen Shot 2016-08-19 at 5.47.29 PM.png
is it for a 4-pole input ?
Stavros Korokithakis
@skorokithakis
Aug 20 2016 00:59
yes
i found that as well, but i don't know which one corresponds to which
in the end, it looks like 5 is mic, 2 is gnd, 3 is r and 4 is l
does anyone know of a nice microsim holder?
smd
Stavros Korokithakis
@skorokithakis
Aug 20 2016 01:08
ah never mind, found one
Stavros Korokithakis
@skorokithakis
Aug 20 2016 01:56
phew
sticking an ESP, an A6, a mic jack, a sim, an antenna and all the other pins and things on a 5x5 cm board is pretty tight
Akash Ashok
@thehellmaker
Aug 20 2016 04:40
Interesting. Guys question. Is ESP 8266 powerful enough to stream audio? I was thinking of streaming voice from a mic throught esp8266 to a centralized server for voice recognition. Is this possible with esp8266?
Me No Dev
@me-no-dev
Aug 20 2016 05:35
@thehellmaker it is possible, but you will need to sample at equal intervals, then combine on the other end with the same sample frequency to reconstruct the sound
Akash Ashok
@thehellmaker
Aug 20 2016 05:40
I'm assuming since the frequency is around 180Hz - 500Hz the MCU is in Mhz its definitely capable. My question is since its a lot of data ESP has to stream can it handle it other wifi requests while its streaming voice. I think the answer is no. @igrr mentioned that ipstack has one thread and hence only one ip request is processed at any point. correct me if i am wrong here
Me No Dev
@me-no-dev
Aug 20 2016 05:42
that is true but most transmissions are multipacket and there is time between the packets to handle other connections.
there is an ESP-Radio project and I have personally streamed PCM to the ESP which plays through I2S
you just need to go Async to be able to do it all at the same time
Akash Ashok
@thehellmaker
Aug 20 2016 05:43
makes sense ....
Clemens Kirchgatterer
@everslick
Aug 20 2016 08:13
@skorokithakis if it becomes really difficult to make them fit, you could put some components on the backside. like the A6 or ESP
Stavros Korokithakis
@skorokithakis
Aug 20 2016 08:46
I have, there's a bunch of resistors and the SIM card on the back, @everslick
Clemens Kirchgatterer
@everslick
Aug 20 2016 10:45
ic
Stavros Korokithakis
@skorokithakis
Aug 20 2016 13:14
i'm measuring the current draw of the A6 and it's coming out to half a MILLIamp, can that be right?
i was expecting 200 mA at least
and of course it's not right, the multimeter probe was in the wrong place
yay
Germán Martín
@gmag11
Aug 20 2016 13:23
Current may depend on mobile coverage quite a lot.
Data sheet value is the worst case
Stavros Korokithakis
@skorokithakis
Aug 20 2016 13:28
ah, right
can anyone help me with this inconsistency? What my library does is try to autodetect the baud rate by sending "AT" and listening to a response, and later just proxies Serial <-> SoftSerial. the module mostly seems to be unresponsive when i try autodetection, but when I power-cycle it while the ESP is proxying, it works fine every time. i can't see any reason why i wouldn't be seeing any output from the module in the autodetection yet it works fine when just proxying raw bytes...
Stavros Korokithakis
@skorokithakis
Aug 20 2016 14:06
also, i declared an int array like int rates[] = {115200, 9600, 1200, 2400, 4800, 19200, 38400, 57600};, can i get the size at runtime so i can loop over it?
ah, i found the problem, i wasn't sending a CR before the AT, so the previous autodetector commands were messing the module up
Michael Miller
@Makuna
Aug 20 2016 14:29
'sizeof (rates)/sizeof (rates xamarin/xamarin-android@a16673d)', usually you will a macro defined as countof () that is just this.
Stavros Korokithakis
@skorokithakis
Aug 20 2016 14:29
do you mean sizeof(rates)/sizeof(int)?
oh
ratesxamarin/xamarin-android@a16673d?
damn
Michael Miller
@Makuna
Aug 20 2016 14:30
Wow, that got mangled, the last part was rates indexed at zero
Stavros Korokithakis
@skorokithakis
Aug 20 2016 14:30
why does this keep happening?
which makes sense, because it's yours :P
axamarin/xamarin-android@a16673d
Michael Miller
@Makuna
Aug 20 2016 14:31
Yup
Stavros Korokithakis
@skorokithakis
Aug 20 2016 14:31
thanks!
a1
a[2]
a[3]
the hell?
Michael Miller
@Makuna
Aug 20 2016 14:32
It's some weird markup feature I guess.
Stavros Korokithakis
@skorokithakis
Aug 20 2016 14:49
yeah
bah, i can't get this module to work consistently at all
now it just stopped working again
:/
probonopd
@probonopd
Aug 20 2016 15:51
@me-no-dev remember the Hue emulator? Maybe it should be rewritten using your Async libraries?
kiralikbeyin
@kiralikbeyin
Aug 20 2016 18:03

I am trying to append a file at the end of -2 char

   File ffyenicihaz = SPIFFS.open("/c/cihazlar.json", "a+");

    ffyenicihaz.seek(-2 ,SeekEnd);
    Serial.println(ffyenicihaz.position());

position is looking ok but it write to end not end-2

any idea?
Germán Martín
@gmag11
Aug 20 2016 18:40
@kiralikbeyin I guess that a+is the reason. Try to open the file with w+parameter
kiralikbeyin
@kiralikbeyin
Aug 20 2016 19:02
File ffyenicihaz = SPIFFS.open("/c/cihazlar.json", "w+");

    ffyenicihaz.seek(-2 , SeekEnd);
    Serial.println(ffyenicihaz.position());

    ffyenicihaz.seek(ffyenicihaz.size() -2, SeekSet);
    Serial.println(ffyenicihaz.position());

    ffyenicihaz.seek(ffyenicihaz.position() -2, SeekCur);
    Serial.println(ffyenicihaz.position());
all of them returning 0 , also tried "w"
Germán Martín
@gmag11
Aug 20 2016 19:04
I'm try to move from Visual Studio to Platformio. I cannot get autocomplete working with ESP specific functions and libraries. May you confirm if autocomplete and Goto Declaration are working in your side? If so, could you give me any indication?
@kiralikbeyin W alone deletes the file before creating it. Are you sure it does exist?
kiralikbeyin
@kiralikbeyin
Aug 20 2016 19:56
yes there was always json file , tried 4-5 times with w+ and w also
Germán Martín
@gmag11
Aug 20 2016 19:58
¿? No guess
probonopd
@probonopd
Aug 20 2016 19:58
hi, is https://github.com/esp8266/arduino-esp8266fs-plugin supposed to upload SPIFFS over WIFI when the OTA port is selected?
(it appears to do something but I don't think it's acually working for me...)
Stavros Korokithakis
@skorokithakis
Aug 20 2016 19:59
Damnit, these A6 modules are $1.8 each and a few thousand dollars of your time spent banging your head against the wall
kiralikbeyin
@kiralikbeyin
Aug 20 2016 19:59
@gmag11 thanks i hope 430 man here one of them worked with file position :)
Me No Dev
@me-no-dev
Aug 20 2016 21:02
@probonopd yes I do :)
have to dig what I have
probonopd
@probonopd
Aug 20 2016 21:03
got some contributions on https://github.com/probonopd/ESP8266HueEmulator recently
@me-no-dev
Me No Dev
@me-no-dev
Aug 20 2016 21:07
will give it a go :)
probonopd
@probonopd
Aug 20 2016 21:14
cool! @me-no-dev
Stavros Korokithakis
@skorokithakis
Aug 20 2016 22:26
can anyone look at this function and tell me if they think i'm doing something obviously wrong? https://github.com/skorokithakis/A6lib/blob/master/A6lib.cpp#L192
Stavros Korokithakis
@skorokithakis
Aug 20 2016 22:31
this is the output: https://www.pastery.net/puzrxf/
Germán Martín
@gmag11
Aug 20 2016 22:47
@skorokithakis Check parenthesis in A6WaitFor, in while condition. Add more debug info to check more variables too.
Stavros Korokithakis
@skorokithakis
Aug 20 2016 22:48
@gmag11 what's wrong with the parentheses (i think this is related to a bug i was having)? as for the variables, i don't know if there's something to check, there's just no output :/
Germán Martín
@gmag11
Aug 20 2016 22:50
Ok not sure if == is calculated after + or it is the opposite. Check the result of that operation adding some logs
Stavros Korokithakis
@skorokithakis
Aug 20 2016 22:51
@gmag11 i think you're right, sometimes i saw an "AT" come in as the correct reply, but the operation still timed out
@gmag11 i've added more parentheses to make sure https://github.com/skorokithakis/A6lib/blob/master/A6lib.cpp#L280
hm, i don't know what's going on... it seems that the module may just not be ready
this, especially, is very odd: https://www.pastery.net/qyvpfz/
maybe the module is trying to autodetect baud too?
Germán Martín
@gmag11
Aug 20 2016 23:02
You can use another ttl-usb to see what's on the line, connecting rx line. I don't know if I explain correctly. I did it so when programming my Firmata lib
Stavros Korokithakis
@skorokithakis
Aug 20 2016 23:03
hmm, you think there will be something different? let me try that
Germán Martín
@gmag11
Aug 20 2016 23:03
I mean
Stavros Korokithakis
@skorokithakis
Aug 20 2016 23:04
i know, connect my FTDI's RX to the A6 TX to see what's there
but i already print everything that's coming in, so i don't know if there will be anything different
Germán Martín
@gmag11
Aug 20 2016 23:04
Right
Stavros Korokithakis
@skorokithakis
Aug 20 2016 23:04
let me try it and see though
hmm, that was a good idea
Stavros Korokithakis
@skorokithakis
Aug 20 2016 23:11
the module is, indeed, not responding
is there a way to "clear the line" or something, when trying different baud rates?
it's odd, i see the module echoing the commands back to me, but no +OK
Stavros Korokithakis
@skorokithakis
Aug 20 2016 23:27
okay, it looks like there's nothing wrong with my code or anything. the module is just not responding generally
Stavros Korokithakis
@skorokithakis
Aug 20 2016 23:49
ugh, this is driving me insane... the ESP is sending an "AT\r\n", the A6 does not respond (i'm watching with an FTDI programmer on the wire). i take the TX cable from the ESP and put it on the FTDI, and send "AT\r\n", the A6 responds. what the hell!