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
i use it to avoid defining my secrets in the file
basically this q/a is making me realize i should make this a proper framework with a readme that people can clone and use
geman220
@geman220
But then you wouldn't have to sit in a chat all day answering Q/A! =)
Stavros Korokithakis
@skorokithakis
haha
skorokithakis @skorokithakis runs off quickly to write the framework
geman220
@geman220
Other than defining the var in build.sh to avoid having passwords / information in the main.ino is there any reason to do it? I ask because since I am just starting out I like to keep things together in one spot as best I can, it helps me understand the logic and flow. Once I am more comfortable with what I am doing I then split out things into includes etc.
When I was learning YAML for HASS I had one really long 2000+ line config for like 2 months until I was comfortable with what I was doing. Then I split everything up so it's actually manageable now, for example.
Stavros Korokithakis
@skorokithakis
no, no other reason
i just like to publish my code and secrets in the code were non-great
plus this way i can reuse the code
geman220
@geman220
Yea makes more sense. I'll clean it up once I'm more comfortable with what I'm doing.
I went ahead and setup Mosquitto to make things easier and migrated my device tracker over
I'm not certain but just publishing to a topic also creates the topic correct? So really now that I have Mosquitto up and running and working I don't need to modify anything I can just let the publisher create the topic blinds/command
Stavros Korokithakis
@skorokithakis
yeah, just publish
you can also listen to things like
blinds/#
and it will listen to all messages under blinds
geman220
@geman220
Okay, now the waiting game to get my ESPs =(
Stavros Korokithakis
@skorokithakis
yeah, that's always the worst part :/
geman220
@geman220
So if I remove the potentiometer just to do a basic proof of concept, I should be able to set a delay then stop the servo after the delay correct?
Stavros Korokithakis
@skorokithakis
i am not sure at all about that
possibly?
geman220
@geman220
Ha okay I'll look around online
Michael Miller
@Makuna
@geman220 using timing is not a safe approach, you really need sensors and stop on sensor. Voltage variance will effect the speed of the servo.
geman220
@geman220
=( more complexity
Michael Miller
@Makuna
if you are using unmodified servos, then it has an internal sensor for position so you can set it and forget. If you disable the internal sensor for continuous mode, then you need external sensors.
geman220
@geman220
Okay so I just need a continuous servo
Michael Miller
@Makuna
continuous servos either ignore the internal sensor or have it disabled when shipped, so you then have to have an external sensor.
CHAE-PIL LIM
@chaeplin
https://twitter.com/mydailyview/status/722476960761249793 It's direct image posting. Just for fun. esp-01 to twitter.
geman220
@geman220
So essentially there is no way turn open/close blinds unless I get some sort of other sensor to tell it when to stop turning
Unless by some miracle 180 degrees is enough
Michael Miller
@Makuna
@geman220 well, close to correct. More precisely, if a servo with internal sensor does not support the range of motion you need, then you will need external sensors. There are servos that do extended ranges and often most will do 200 degrees. To use them, you will need to then use the writeMicroseconds() method instead. The servo library is written to compatible with the normal Arduino library, so you can use their docs for reference.
geman220
@geman220
Oh well that makes me feel much better =]. I'll probably look into getting servos that go up to 200 and use the method you mentioned.
Michael Miller
@Makuna
@geman220 Yours may already go to 200, try them with the writeMicroseconds() first.
geman220
@geman220
@Makuna so instead of myservo.write(180); do myservo.writeMicroseconds(200);
I just looked my servo up it moves 180
Stavros Korokithakis
@skorokithakis
so i want to make this boilerplate framework for the ESP and i need a place to put my settings
what's a good place for that? something like settings.h?
i'm afraid my C knowledge isn't great
Stavros Korokithakis
@skorokithakis
can i #ifdef an include?
Michael Miller
@Makuna

@geman220 Review the Arduino Servo Reference. you are setting the microseconds, not angle. These are the helpful values ...

#define MIN_PULSE_WIDTH       544     // the shortest pulse sent to a servo  
#define MAX_PULSE_WIDTH      2400     // the longest pulse sent to a servo 
#define DEFAULT_PULSE_WIDTH  1500     // default pulse width when servo is attached

When you "attach" the Servo, you can provide your own min and max like

Servo.attach(pin, 500, 2500); // use an extended range
Keith Andrew Hill
@vic10us
Anyone know a good place to get nema 17/23 steppers in or around Montreal?
Jeeth Suresh
@jeethsuresh
hey guys! quick question - in the ESP8266WiFi class the object WiFi is defined externally
where is that defined?
Martin Ayotte
@martinayotte
in 2.2.0/libraries/ESP8266WiFi/ ...
Jeeth Suresh
@jeethsuresh
right, but if I wanted to dynamically assign channels to the SoftAP when I'm generating it for my mesh network, where would I go to change the code to let me do that? Or am I thinking of this wrong?
Markus
@Links2004

there is a parameter for it.

bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0);

https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiAP.h#L39
note: the Parameter may by overriden when you use the STA mode too the ESP can only work on one channel and STA mode has priority.

Lars Englund
@larsenglund
@jeethsuresh is your mesh network code on github?
Does anyone else know of a mesh library for esp arduino?
Nagy Attila Gábor
@mrbig
Hello all, I've been trying to make the EventManager (https://github.com/igormiktor/arduino-EventManager ) run on esp8266 arduino core. Since I have to #ifdef some parts of the code, I wonder if there is any predefined macro I could use to detect the presence of the arduino-core. Currently I'm using ESP_H, but that just doesn't seem to be right.