These are chat archives for esp8266/Arduino

17th
Jun 2018
Stavros Korokithakis
@skorokithakis
Jun 17 2018 00:24 UTC
has anyone ever used a MG 996R servo? i find it impossible to drive
i give it various values, and it will only move if the value is much farther than its current position, it will draw a lot of current even though it's under no load, etc
does anyone have working code for them?
Stavros Korokithakis
@skorokithakis
Jun 17 2018 00:30 UTC
ahh, apparently i need a 5v control signal
good luck to me
Stavros Korokithakis
@skorokithakis
Jun 17 2018 00:37 UTC
i need to switch 5V with a 3.3V signal, so I use a P-MOS with my 3.3V signal connected to the gate. what do I connect to the drain and source?
source is ground?
Chris Dalby
@moose4621
Jun 17 2018 00:55 UTC
@denman0000_gitlab Good morning. Been out doing chores. :-(
@denman0000_gitlab Not sure which comments you are refering to. My last comment for you was about printing the received data to serial rather than going to the trouble of setting up leds since it is the message Tx Rx that you are most interested in?
den har
@denman0000_gitlab
Jun 17 2018 00:57 UTC
@moose4621 Good morning to you too :-) sorry re chores .. :-)
@moose4621 thanks for the replies .. thought as much .. just uploading code and then off to sleep .. will add led's and try get it going in the morning and also have to gzip and upload my web pages to the esp8266 .... I'm using a raw esp8266 12f ;-)
Chris Dalby
@moose4621
Jun 17 2018 00:59 UTC
@denman0000_gitlab So where are you at?
den har
@denman0000_gitlab
Jun 17 2018 01:00 UTC
set staic IP for WIFI_STA (joining my existing AP (have to figure out how wifi.multi can be assigned static IP's ( I commented out the SOFT_AP for now )
*STAIC = STATIC
Chris Dalby
@moose4621
Jun 17 2018 01:00 UTC
@denman0000_gitlab OK cool. You don't HAVE to compress the files during development but Once you have a compressed version in spiffs, it will always go to that file and not an uncompressed version.
den har
@denman0000_gitlab
Jun 17 2018 01:01 UTC
indeed
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:01 UTC
does anyone know how i can use a mosfet to level-shift 3.3V to 5V?
den har
@denman0000_gitlab
Jun 17 2018 01:01 UTC
@moose4621 do you know if SPIFFS gets wiped when you upload sketch data to it ?
Chris Dalby
@moose4621
Jun 17 2018 01:02 UTC
@skorokithakis Yes, stand by.
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:03 UTC
thanks, @moose4621 , i appear to be useless at it :/
Chris Dalby
@moose4621
Jun 17 2018 01:03 UTC
@denman0000_gitlab No it doesn't. only if you change the spiffs size or specifically delete the files. I think there is a spiffs format available too.
den har
@denman0000_gitlab
Jun 17 2018 01:05 UTC
@moose4621 great I think I recall seeing a mkspiffs tool ...
@moose4621 i have uploaded this sketch .. https://github.com/tttapa/ESP8266/tree/master/Examples/14.%20WebSocket/A-WebSocket_LED_control and so far can access the webpage with the sliders and the rainbow icon
@moose4621 as my first test I will copy one of the buttons and blink the build in LED using the copy/modified button
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:13 UTC
bah, apparently you can't make a low-to-high level shifter with just a mosfet
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:15 UTC
@moose4621 thank you!
den har
@denman0000_gitlab
Jun 17 2018 01:15 UTC
@moose4621 Thanks a million for the nudge to reload the template etc .. I'm liking the UPLOAD option on the edit page so far ;-)
Chris Dalby
@moose4621
Jun 17 2018 01:16 UTC
@denman0000_gitlab Handy isn't it. :-)
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:19 UTC
@denman0000_gitlab I hadn't, thanks! That looks very useful
den har
@denman0000_gitlab
Jun 17 2018 01:19 UTC
Stavros .. seems similar ;-) transistor=two diodes +- LOL
might even end up better for replacement when things are up in smoke ;-)
no single point of failure
anyways worth a look ;-)
Was just looking at moose's circuit
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:22 UTC
@denman0000_gitlab I ended up going with the mosfet, but it was the single-pmos version and I didn't mind an inversion
so both of you helped, thank you
den har
@denman0000_gitlab
Jun 17 2018 01:22 UTC
awesome Stavros
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:23 UTC
i also ordered a level shifter, just in case :P
den har
@denman0000_gitlab
Jun 17 2018 01:23 UTC
nice to have alternative if you dont have the right spares lying around
especially if quick and dirty is needed
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:23 UTC
yep, exactly
den har
@denman0000_gitlab
Jun 17 2018 01:25 UTC
@moose4621 .. you wouldn't happen to have somoe quick var test in mind for my plight perhaps ?
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:25 UTC
@moose4621 yeah, i just bought five of those now
den har
@denman0000_gitlab
Jun 17 2018 01:27 UTC
@moose4621 Message on esp8266 port 81 ...this is a websocket server only
Chris Dalby
@moose4621
Jun 17 2018 01:28 UTC
@denman0000_gitlab Put a button in your html and give it an ID and oninput = "sendtest();"
In webSocket.js add sendtest() {connection.send("Testing")}
This message was deleted
Geeze I am all thumbs today!
den har
@denman0000_gitlab
Jun 17 2018 01:34 UTC
@moose4621 Thanks you will do that ....Again thanks a million for this invaluable info
@moose4621 by the way is your OTA working ? I dont see the IP port mentioned under tools in the tutorial page here https://tttapa.github.io/ESP8266/Chap13%20-%20OTA.html
Stavros Korokithakis
@skorokithakis
Jun 17 2018 01:36 UTC
@denman0000_gitlab it's 8266
are you using HTTP OTA or direct OTA?
den har
@denman0000_gitlab
Jun 17 2018 01:37 UTC
@skorokithakis following this tut ..https://tttapa.github.io/ESP8266/Chap13%20-%20OTA.html
Chris Dalby
@moose4621
Jun 17 2018 01:38 UTC
@denman0000_gitlab Yeah/ Nah.... Not really. I get the port coming up and when I try to load a sketch it asks for a password repeatedly even though I deleted the password line. I have come to the conclusion that it is this computer and a firewall setting maybe. Having said that, if I am away from all other accespoints, (ie, out in the paddock), I have managed to use OTA.
den har
@denman0000_gitlab
Jun 17 2018 01:38 UTC
@moose4621 well I'm sure we can all get it working together
will update as I go too
Chris Dalby
@moose4621
Jun 17 2018 01:39 UTC
@denman0000_gitlab @skorokithakis OK cool. I have to go for an hour or two. More work to be done. Good luck to both of you.
den har
@denman0000_gitlab
Jun 17 2018 01:40 UTC
@moose4621 have you tried directly connecting to your AP in softAP mode then too .. that would eliminate or narrow down port/firewall issue i imagine
@moose4621 Happy days man ;-) TY for all the help again ..you rock and have a great rest of the day and evening
Chris Dalby
@moose4621
Jun 17 2018 01:41 UTC
@denman0000_gitlab Yeah I always connect direct to esp as it will only be used in AP mode in the field.
@denman0000_gitlab Thanks and good night.
den har
@denman0000_gitlab
Jun 17 2018 01:48 UTC
@skorokithakis after esp8266 boots it does say OTA is ready in serial console
den har
@denman0000_gitlab
Jun 17 2018 02:03 UTC
@skorokithakis saw this thread for OTA help ;-) esp8266/Arduino#2415 ..... troubleshooting now
@moose4621 esp8266/Arduino#2415
den har
@denman0000_gitlab
Jun 17 2018 02:26 UTC
@skorokithakis @moose4621 Now OTA port appearing :-) and I underatand mDNS and network OTA ...definitely firewall could be an issue UDP 5353 and a few other things :-) lemme know if you need help
den har
@denman0000_gitlab
Jun 17 2018 11:53 UTC
@moose4621 Hi Moose :-) have got things functional now :-) OTA working (although some oddities.. will explain later) have added the TEST
function senddata() { connection.send(var); }
and
case WStype_TEXT: // if new text data is received Serial.printf("[%u] get Text: %s\n", num, payload); if (payload[0] == '#') { // we get RPM data
Chris Dalby
@moose4621
Jun 17 2018 11:55 UTC
@denman0000_gitlab Ok great. I haven't tried OTA again yet.
den har
@denman0000_gitlab
Jun 17 2018 11:55 UTC
@moose4621 have noticed that websockets dont work when coming in from outside my router ..so you have hit the ESP8266 but websockets wont work .. I would have to open port 81 (or setup a NAT/PORT address translation and a firewall setting on my routers..will maybe do that at some stage)
@moose4621 at least now know what to check for OTA to get it working ..magic when it works ..one of the shortcomings is an ESP remote reboot (will try find a way perhaps)
Chris Dalby
@moose4621
Jun 17 2018 11:57 UTC
@denman0000_gitlab So you get messages now on softAP
den har
@denman0000_gitlab
Jun 17 2018 11:58 UTC
@moose4621 negative since I think I haven't fired up the softAP .. but am getting them on serial console
Chris Dalby
@moose4621
Jun 17 2018 12:00 UTC
@denman0000_gitlab Awesome. The "if (payload[0] == # is optional since you are only want to read the text anyway.
den har
@denman0000_gitlab
Jun 17 2018 12:01 UTC
@moose4621 .. your guidance has been spot on thank you kindly ..
@moose4621 now have to figure out that printf line and also how to send serial info
@moose4621 and how to do similar without websockets
@moose4621 by the way FYI .. I am using a DS1307 RTC connected to ESP as well .. has been working fine as a time source and will switch to a DS3231 this week since its 3.3V as opposed to 5V which the DS1307 uses
@moose4621 the motivation for that is so that I have no reliance upon internet whatsoever for all functions
Chris Dalby
@moose4621
Jun 17 2018 12:05 UTC
@denman0000_gitlab Good idea. I prefer to be independant of iot etc too. Try https://en.wikipedia.org/wiki/Printf_format_string
@denman0000_gitlab So what is the end result going to do?
den har
@denman0000_gitlab
Jun 17 2018 12:14 UTC
@moose4621 I want to host a schedule for events (hence the table of events) currently I have the table side working .. and can read from and update a file but I have to somehow get that into the arduino side of the ESP if that makes sense
@moose4621 the way I used to update events was via serial console and a string capture of the input , I would chop an incoming string up into the correct variables to update an array which is checked constinuously
@moose4621 so my big dilemma here has been how to replace the input mechanism or at least get serial input through .. perhaps I could just read the web input directly into the array currently being used then I don't need the serial part of things which would be fab !
den har
@denman0000_gitlab
Jun 17 2018 12:20 UTC
aaah I see prinft works link the sprint function ..very similar in fact .. I am used to using sprint when working with arrays and variables
Chris Dalby
@moose4621
Jun 17 2018 12:24 UTC
@denman0000_gitlab It sounds quite do-able. How many events are you likely to have scheduled?
den har
@denman0000_gitlab
Jun 17 2018 12:25 UTC
the event stuff was all working perfectly on the arduino :-) I never tested the total amount but it was really only limited by the memory on the arduino for the ARRAY
and old events get deleted \
Chris Dalby
@moose4621
Jun 17 2018 12:27 UTC
@denman0000_gitlab I was just thinking if the Eeprom might be easier than writing a file in spiffs and reading it back. If you already have that part soughted though....
den har
@denman0000_gitlab
Jun 17 2018 12:28 UTC
@moose4621 two years ago I built a c# windows app to fetch email from gmail and once a certain email was received it would read an attatched filoe and react accoringly .. i built that to automatically deploy virtual machines in my labs
@moose4621 yes on arduino it was all RAM based so to speak ... I never dumped anything to eeprom or SD since the only mission was to keep the arduino up and running
@moose4621 I am just trying to figure out how to marry the web page/server variables or actions with the ESP arduino side
@moose4621 I'' think of a smiple exaple to explian and maybe doing that I can also come up with a solution .. back to basics I guess and KISS :-0
den har
@denman0000_gitlab
Jun 17 2018 12:34 UTC
@moose4621 the amount of tech and intelligence in this little ESP chip is just AMAZING ...I'm loving it
Chris Dalby
@moose4621
Jun 17 2018 12:35 UTC
@denman0000_gitlab I cannot imagine why I would use an arduino board again after using the esp.
@denman0000_gitlab The esp32 is a super chip.
den har
@denman0000_gitlab
Jun 17 2018 14:48 UTC
@moose4621 I agree 100%
@moose4621 Two years back I built a solar controller with arduino but found that battery sampling and measurement was not great on the arduino ..so I dumped the project .. may resurrect this now though ...It will also be an intelligent battery charger too
@moose4621 perhaps you'd like to join me on that mission :-) ?
Chris Dalby
@moose4621
Jun 17 2018 20:40 UTC
@denman0000_gitlab Sorry 'bout the delay, I fell asleep on the lounge. Too cold out in my office so I came in to the warmth and promtly fell asleep.
@denman0000_gitlab So why was the battery project not going the way It should have?
Chris Dalby
@moose4621
Jun 17 2018 20:46 UTC
@denman0000_gitlab I am on stand alone solar power here. I use a Plasmatronic PL60 controller with an external SSR to control a second bank of panels to excess of 60 amps @ 48v. http://www.plasmatronics.com.au/downloads/PL60.PL80.UserGuide.V6.pdf
@denman0000_gitlab What size controller are you looking at making?
Chris Dalby
@moose4621
Jun 17 2018 20:51 UTC
@denman0000_gitlab My current mission is to get a ping pong timer working on the client to alert the operator of a broken link. It seems the esp version of websockets does not have native ping pong.
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:22 UTC
hi again everyone
i'm trying to drive a toy tank with it (it has one of those little toy motors per tread), but when i give the signal, the LED on the bridge dims and the track only moves a mm
even with no load
i measured the voltage on the motor and it dropped from 2.something (initial voltage is 5V) to 0.7V for some reason
Chris Dalby
@moose4621
Jun 17 2018 22:26 UTC
@skorokithakis Are you using the test script from aliexpress?
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:27 UTC
bah, i am not, i looked for a test script but i just came across the Ali page when trying to show it to you guys
i'll try it, thank you
den har
@denman0000_gitlab
Jun 17 2018 22:27 UTC
@skorokithakis ..Hi Stavros .. tikanis ?
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:27 UTC
hey @denman0000_gitlab, kala, esi?
den har
@denman0000_gitlab
Jun 17 2018 22:28 UTC
Kali ime efahristo :-)
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:29 UTC
haha, nice
@moose4621 do you know what the sbit/reg51 stuff is?
den har
@denman0000_gitlab
Jun 17 2018 22:30 UTC
@moose4621 ...have been observing certain connect disconnect anomalies with websockets .. Maybe you instead of ping pong you could used the disconnect message/code
@moose4621 cool re power :-) interesting stuff too ...cold here too by the way .. southern lattitude winters brrr
@moose4621 size of controller would be small .. I only have a smallish panel but quite a few batteries .. so to save me having to rotate them manually relay controls would be ideal ..maybe add servos and LDR in for follow the sun for MPPT control ... of course if the design is simple and clever enough it essentially would for the core for any size ..not so ?
@skorokithakis are you based in greece ? if so where ?
den har
@denman0000_gitlab
Jun 17 2018 22:36 UTC
@skorokithakis I'm not greek but grew up with a good few greeks and best friend was greek .. cureently have a freind based in athens
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:37 UTC
@denman0000_gitlab greece, yeah
thessaloniki, macedonia
den har
@denman0000_gitlab
Jun 17 2018 22:37 UTC
I noticed websockets has a few connection shortcomings .. not consistent across all devices an ages of browsers it seems ..unless its the libraries being used .. although I don't see any jquery library .. will poke around a little more
@skorokithakis Cool :-) Nice to meet you
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:38 UTC
you too man
where are you based?
den har
@denman0000_gitlab
Jun 17 2018 22:38 UTC
@skorokithakis I'm in Johannesburg South africa
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:38 UTC
oh, how is joburg?
den har
@denman0000_gitlab
Jun 17 2018 22:39 UTC
Cold , but otherwise ok I guess LOL .. you been here or ex SA ?
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:39 UTC
no :(
i've wanted to visit cape town
maar ek het 'n paar suid-afrikaanse vriende
den har
@denman0000_gitlab
Jun 17 2018 22:39 UTC
@skorokithakis you can do both in one trip :-) do a day or two in Johannesburg max lol
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:40 UTC
yeah but i heard it's not very safe :p
den har
@denman0000_gitlab
Jun 17 2018 22:40 UTC
@skorokithakis Wow well done on Afrikaans ;-) hahaha
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:40 UTC
dankie :P
den har
@denman0000_gitlab
Jun 17 2018 22:41 UTC
It's safe if you're a tourist cos they make sure you're safe :-) you'll be quite fine :-) the Cape best in February weatherwise
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:41 UTC
ah, great
i'll arrange a trip at some point, thanks boet
den har
@denman0000_gitlab
Jun 17 2018 22:42 UTC
efharisto zon hahaha
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:42 UTC
haha :smile:
damn this h-bridge
den har
@denman0000_gitlab
Jun 17 2018 22:42 UTC
@skorokithakis So greek re lingo ( no insult intended ) I hear zon is common place
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:43 UTC
i can't figure out what it's doing, it's drawing 500 mA and not moving
@denman0000_gitlab hmm, i don't think so?
den har
@denman0000_gitlab
Jun 17 2018 22:43 UTC
@skorokithakis use petrol and a lighter for hbridge
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:43 UTC
i'm not sure what you mean
haha
den har
@denman0000_gitlab
Jun 17 2018 22:44 UTC
@skorokithakis I mean the word zon is alomost like uring bro or boet ;-)
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:44 UTC
i don't think i've ever heard that word :tongue:
maybe it's spelled differently
Chris Dalby
@moose4621
Jun 17 2018 22:46 UTC
@moose4621 do you know what the sbit/reg51 stuff is? Morning den har. Or evening for you:-) No can't help you with this.
Stavros Korokithakis
@skorokithakis
Jun 17 2018 22:46 UTC
@moose4621 np, it just seems to be their way of setting the outputs
but yeah, i'm doing the same thing as them, except i'm using an ESP... maybe they need different levels, who knows
den har
@denman0000_gitlab
Jun 17 2018 22:47 UTC
@moose4621 Hi Moose :-) hope all's well .. and you enjoyed your power nap
Chris Dalby
@moose4621
Jun 17 2018 22:50 UTC
@denman0000_gitlab Thanks, yeah all good woke up at midnight and went to bed. Another wasted evening. Ha ha.
So, why won't websockets do what you want?
@denman0000_gitlab I mean, are it's shortcoming a show stopper for you?
den har
@denman0000_gitlab
Jun 17 2018 22:56 UTC
@moose4621 Sleep is never a waste
@moose4621 .. not a showstopper ..
Chris Dalby
@moose4621
Jun 17 2018 23:01 UTC
@skorokithakis @denman0000_gitlab I should be at work by now. :-( Better sign off and get out of here. See you in about 8 hours.
Stavros Korokithakis
@skorokithakis
Jun 17 2018 23:01 UTC
same here, later everyone
den har
@denman0000_gitlab
Jun 17 2018 23:02 UTC
@moose4621 .. re websockets seems you may have to have port 81 open if coming in from outside router ..damn ...will feedback results tomorrow
@skorokithakis Goodnig Stavros And Have a good day @moose4621
chat later :-)
den har
@denman0000_gitlab
Jun 17 2018 23:10 UTC
Does anyone here know how to get WEBSOCKETS working from outside a router ? Specifically what NAT or PAT must be made ,for a custom port apart from 81 on client side .. what must be changed ?
den har
@denman0000_gitlab
Jun 17 2018 23:22 UTC
@moose4621 See here for ping pong sort of thing under websockets heading https://github.com/israellot/esp-ginx
den har
@denman0000_gitlab
Jun 17 2018 23:56 UTC