Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Stavros Korokithakis
@skorokithakis
and has some assorted code to deal with crap i had to deal with during the ages
that's why i was asking @Makuna about the library
i want to make it into a library/framework and put it on github
so people don't have to rewrite all that crap every time
geman220
@geman220
I see. So from what I've been reading so far I should be able to take my solar LiOn 5V2.1A or 5V1A split the power, hook power via USB into the ESP, wire hot/ground to the servo separate and connect 1 data to the servo from the ESP on any data pin I choose. Am I on the right track?
The battery is 10000mah so I believe it should run everything for a while without solar charging, but it has a solar panel on it and it will be facing outside of the window.
Stavros Korokithakis
@skorokithakis
yeah, sounds good to me, as long as they share a ground
maybe you'll find this useful: https://www.stavros.io/notes/hardware/
geman220
@geman220
Awesome, I'll read through this today
Stavros Korokithakis
@skorokithakis
it's just two paragraphs, it'll take two seconds :smile:
geman220
@geman220
Ha I already read that page. I meant the other content on your blog =)
Stavros Korokithakis
@skorokithakis
oh right :P
geman220
@geman220
I'm sure it's going to be a headache to get running at first, but it's always fun to learn something new and make something.
Stavros Korokithakis
@skorokithakis
nah, it's trivial, get platformio
mkdir mything
cd mything
platformio init --board=esp12e
<edit your src/main.ino>
platformio run -t upload
done
geman220
@geman220
Is there a way to emulate a program? Or will I have to wait until my ESPs and servo get here
Stavros Korokithakis
@skorokithakis
you'll have to wait, i'm afraid
which nodemcu did you get?
Stavros Korokithakis
@skorokithakis
ah, that's my favorite
geman220
@geman220
I read online it was the best overall
Stavros Korokithakis
@skorokithakis
i should probably buy a few more
yeah it is
geman220
@geman220
I actually did SOME research =P
Stavros Korokithakis
@skorokithakis
haha
geman220
@geman220
Should platformio have made the src/main.ino?
Stavros Korokithakis
@skorokithakis
i don't think it does
just use mine
geman220
@geman220
Ah okay just making sure I didn't miss something
Stavros Korokithakis
@skorokithakis
nope, i think it makes one if you use the blink template
you can use templates, i seem to recall
hey, @ivankravets, can i use a git repo as a template? i'd like to do something like platformio init --from-repo=git@github.com:skorokithakis/wifi-template.git
geman220
@geman220

Where are these includes in your program coming from?

#include "PubSubClient.h"
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <DHT.h>

Do I need to physically get those? Are they just default Arudino IDE libraries? If so I can just look up the included servo library and add it correct?

Stavros Korokithakis
@skorokithakis
oh yes, sec
add to your platformio.ini:
targets = upload
lib_install = 19,89
build_flags = -DMQTT_MAX_PACKET_SIZE=1024
upload_flags = -a OTAPASS
upload_port = 192.168.10.144
it'll download and install the libraries
change otapass to your otapass and the IP to your wifi ip
geman220
@geman220
Sorry, OTA pass? Is that just the wireless password? I was confused about that in the program as well because there is WIFI_PASS is OTA_PASS
Stavros Korokithakis
@skorokithakis
OTA pass is authentication for flashing over wifi
so random people can't just drive by and flash new firmware
running this will make your ESP flashable over wifi
so you don't need to have it connected to the pc
geman220
@geman220
Oh, I see. Makes more sense now
Stavros Korokithakis
@skorokithakis
i need to take some time and write all this up
geman220
@geman220
upload_port = 192.168.10.144 is that generic or will I need to modify that for my subnet

And just so I'm clear in my own head...

[env:nodemcuv2]
platform = espressif
framework = arduino
board = nodemcuv2
targets = upload
lib_install = 19,89
build_flags = -DMQTT_MAX_PACKET_SIZE=1024
upload_flags = -a pass
upload_port = 192.168.10.144

This will download the libraries to the ESP, does this include all included Arduino IDE libraries? So I can add whatever library I want and it will download it to the ESP?

Ivan Kravets
@ivankravets
@skorokithakis hi. We have an issue for that in PlatformIO 3.0
Stavros Korokithakis
@skorokithakis
ah, fantastic
@geman220, you need to change the IP, yes