Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Aditya Tannu
@AdySan
Nah if it's 5v already should be good to power the nodemcu board
geman220
@geman220
Ah okay
Aditya Tannu
@AdySan
There's an onboard lm1117 to bring it down to 3.3V for the esp
geman220
@geman220
Can you tell me how difficult what I'm trying to accomplish is? I want to hook up 10 of these to 1 servo each and a LiOn solar battery. I need to the ESP's to subscribe to an MQTT topic and rotate the servos so they can open/close my blinds. I don't mean pull the blinds up, just rotate the wheel that opens/closes the slats of the blinds.
On a scale of 1 - 10 what am I getting myself into
I plan to wire the servo directly off the LiOn battery not through the ESP. So I will have power running to the ESP and the servo.
Michael Miller
@Makuna
@geman220 You will need a continuous rotation servo to do that. Further, you will need to sense the end stop (blind all the way up and all the way down)
@skorokithakis I believe there are writups on how to write an Arduino Library; plenty. Did you search and review any of those?
Stavros Korokithakis
@skorokithakis
@Makuna no, I didn't know it was the same process. I'll have a look, thanks
@geman220 should be pretty easy to do what you want, I have code to do most of it
Faraz Ahmed
@faraz117
I am getting this error I have been at it for weeks but cant figure it out ".pioenvs\esp12e\FrameworkArduinoVariant/pins_arduino.h:29:31: fatal error: ../generic/common.h: No such file or directory

include "../generic/common.h"

i am getting this error after i cloned the latest repo
I am using platformio
Ivan Grokhotkov
@igrr
do you have the file variants/generic/common.h in your local copy of the repo?
Faraz Ahmed
@faraz117
yes
But the file isn't been created in the .pioenvs when i build my project
Ivan Grokhotkov
@igrr
It seems that platformio copies the current variant, instead of including it into search path.
Faraz Ahmed
@faraz117
Yes .. can you suggest any solution for it ?
Ivan Grokhotkov
@igrr
well, as a workaround, you can copy variants/generic/common.h into your .pioenvs\esp12e\FrameworkArduinoVariant directory and modify pins_arduino.h to include common.h instead of ../generic/common.h
regarding proper solution for this, i think it might be better to ask on platformio channel
Faraz Ahmed
@faraz117
Alright thanks :)
marksev1
@marksev1
Got a few hardware related questions. Here: https://community.openhab.org/t/mqtt-ir-transmiter-receiver/9433 he uses a esp-01, while I would use a wemos d1 mini. So he connects the IR-receiver to GPIO0, if I use same gpio (which i think also on wemos d1 mini has a pullup) I don't need to connect additional resistors. What about if I use different GPIO, do I need to connect resistor between gpio and 3.3v? On GPIO3 he connect an amplifier, why is that?
Faraz Ahmed
@faraz117
I have tried to ask this in the platformio channel too . The work around doesnt work because platformio overwrite .pioenvs on every compilation
geman220
@geman220
@skorokithakis Any chance you know of a good tutorial or read on how to get started on learning how to program something like this project?
Stavros Korokithakis
@skorokithakis
@geman220 I don't know a tutorial, but here's my whole source file: https://www.pastery.net/nhmqbp/
i intend to break it up into a small framework so you can have your passwords in a small build script and then your setup and loop will be in a different file
the framework will take care of mqtt/wifi/whatever
so you can write setup/loop after the ESP has connected to the wifi and mqtt server
geman220
@geman220
@skorokithakis Wow, thanks. This will certainly give me a head start.
Stavros Korokithakis
@skorokithakis
no problem, it should be pretty much all you need
it'll connect to mqtt and receive commands
the commands will be like what i have there
"roll up"/"roll down" or whatever you want
i also have a command to do sensible logging to mqtt
in case you don't have a serial console connected
it'll print its IP address and time and things so you don't go hunting
geman220
@geman220
Awesome! So quick question
 if (command == "forward") {
        motor(1, FORWARD, power);
        motor(2, FORWARD, power);
Is that the command that actually moves the servo?
Stavros Korokithakis
@skorokithakis
yes but that's not a servo
i just output a HIGH on a pin
i have a custom bridge
you need a servo library for your thing
there's one built-in, i think
geman220
@geman220
Yea, I think I read about a built-in one
Stavros Korokithakis
@skorokithakis
by the way, you might find this useful: https://github.com/skorokithakis/tiny-ESP8266-breakout
geman220
@geman220

I guess a more accurate question would be would I mainly be editing that area to turn the servo based on MQTT broker messages? Something like

 if (command == "open") {
        servo(1, 180, power);

Or whatever the actual syntax for the servo library is.

Stavros Korokithakis
@skorokithakis
yeah
that just responds to mqtt messages
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