Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
hoangtrung101
@hoangtrung101
how to convert string IP to IPAddress in ESP8266/arduino ide
Martin Ayotte
@martinayotte
@hoangtrung101 look at IPAddress.fromString()
hoangtrung101
@hoangtrung101
@martinayotte thanks
1rabbit
@1rabbit
hi i'm trying to contact the author of https://github.com/martin-ger/esp_wifi_repeater for a small suggestion about power management
1rabbit
@1rabbit
nevermind i found how to
Myles McNamara
@tripflex
hey guys, so after having issues with NTPClientLib i read this issue, and found that it appears with 2.4.0 that almost all libs for NTP will more than likely not function correctly anymore … stelgenhof/NTPClient#5
does anybody have any sites or documentation, or maybe even just an example, of what I can do to get NTP functional again? can’t seem to find much on it
Myles McNamara
@tripflex
now just need to figure out how to force it to update from ntp
Cubie-Chan
@CubieChansArt_twitter
Hey, can anyone help me with my arduino? i have a robot that can drive and now i wanna do the mapping. so it captures the way it drove. but im a bit confused
mega-hz
@mega-hz
hello, does anyone know why my esp is still not with the fixed IP Adress?
// WiFi.config(ip, dns, gateway, subnet);
WiFi.mode(WIFI_STA);
IPAddress ip(192, 168, 2, 240); // where xx is the desired IP Address
IPAddress gateway(192, 168, 2, 1); // set gateway to match your network
IPAddress subnet(255, 255, 255, 0); // set subnet mask to match your
IPAddress dns(192, 168, 2, 1); // set dns


WiFi.begin(ssid, passwort);
Aaron N.
@porkyneal
@mega-hz, you have just created variables to hold your IP details, need to use WiFi.config() to make them used.
ESP8266WiFiSTAClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1, IPAddress dns2)
mega-hz
@mega-hz
ahh, ok, works! thanks!
Victor Aprea
@vicatcu
FYI, there is a conversation going on in the Arduino developers list about File and Directory classes becoming normalized and they are looking for someone from the ESP8266 developer community to engage there if possible
just wanted to put feelers out, cheers
Me No Dev
@me-no-dev
@vicatcu thanks :)
bobcroft
@bobcroft
@CubieChansArt_twitter , Hi I assume you mean you want to record your robots position as it moves along. If you where looking at distances in tens of metre's you could use GPS. However, I guess you are looking at shorter distances, you could use a compass module to get direction and an encoder on a wheel to get distance. A wheel encoder could be as simple as a reed switch or Hall effect device fixed to the robot body and then a small magnet or magnets fixed to the wheel. One magnet would give a distance resolution of one wheel circumference. It all depends on what accuracy you are after. Signals from the sensors could then be wirelessly transmitted to a receiver unit for processing.
Mehrdad K
@mkeyno
hi guys
does anyone know successful project to reading pulse tone and voice from a landline phone and transmission over wifi?
Daleon L
@Allwaysawake
Hey there I seem to be having a tad bit of trouble connecting to an Https via my Huzzah ESP8266, Can anyone help me...?
bobcroft
@bobcroft
@Allwaysawake Hi see the latest posting in the Arduino -ESP32 group re connecting via Https using WiFiClientSecure.
Daleon L
@Allwaysawake
@bobcroft is the Arduino-ESP32 the same as the ESP-8266...?
bobcroft
@bobcroft
@Allwaysawake , No the ESP32 hardware is very different from the ESP8266. At the moment there is a lot of work being done so that code / libraries developed for the ESP8266 can run on the newer and more capable ESP32. However, there is no need to use an ESP32 if an ESP8266 will do the job. I suggested you look at the ESP32 solution to running https as it MAY help you run it on the ESP8266. I don't use https services at the moment so I can't help further. There are some very clever and very good programmers on these forums who may be able to give you a definite answer. However, as always, you should also search the net for an answer as well.
rodrigocirilo
@rodrigocirilo

Hello, can anyone help.

I have several ESP8266 working as clients, connected in a server (C # app) through a fixed IP, but this IP if not more will be fixed and a DDNS server will be used.

How do I tell ESP that it has to connect to a DDNS and not an IP? (arduino IDE)

Cliente.connect(server, PORTA);

server is a IP (192.168.1.16) and PORTA is a port (9000)
DDNS exemple testone.dyndns.org
Daleon L
@Allwaysawake
@bobcroft thanks for the feedback.
rodrigocirilo
@rodrigocirilo

Alright, try this code. This should work out pretty well for you. If not, let me know. :)

#include <ESP8266WiFi.h>
  #define       LED0      2         // WIFI Module LED
//------------------------------------------------------------------------------------
String Message="";
//------------------------------------------------------------------------------------
// Authentication Variables
//------------------------------------------------------------------------------------
  char*         connect_to = "ssid";
  char*         pass = "password";
  IPAddress     qwertyServer(192,168,4,1);
  WiFiClient    qwertyClient;
//====================================================================================

  void setup()
  {        
    // Setting The Mode Of Pins ---------------------------------------------
    pinMode(LED0, OUTPUT);          // WIFI OnBoard LED Light
    digitalWrite(LED0, !LOW);       // Turn WiFi LED Off

    // Print Message Of I/O Setting Progress --------------------------------
    //Serial.println("\nI/O Pins Modes Set .... Done");

    // Starting To Connect --------------------------------------------------
    WiFi.mode(WIFI_STA);            // To Avoid Broadcasting An SSID
    WiFi.begin(connect_to, pass);          // The SSID That We Want To Connect To

    // Printing Message For User That Connetion Is On Process ---------------
    Serial.println("!--- Connecting To " + WiFi.SSID() + " ---!");

     // Setting The Serial Port ----------------------------------------------
    Serial.begin(9600);           // Computer Communication
    delay(500);
    Serial.print("\n");

    // WiFi Connectivity ----------------------------------------------------
    CheckConnectivity();            // Checking For Connection  
  }

//====================================================================================

  void loop()
  {

    if(WiFi.status() != WL_CONNECTED)
    {
        Serial.println("\nOops! Connection lost. Trying to reconnect " + String(WiFi.SSID()));
        Serial.println("");
        CheckConnectivity();
    }
    else if(qwertyClient.available() > 0)
    {
        ReadMessage();
        Serial.print(Message);

      qwertyClient.flush();
      }

  }
//====================================================================================

  void ReadMessage()
  {
      Message = "";
      Message = qwertyClient.readStringUntil('\r');
  }

//====================================================================================

  void CheckConnectivity()
  {
    while(WiFi.status() != WL_CONNECTED)
    {
      for(int i=0; i < 2; i++)
      {
        digitalWrite(LED0, !HIGH);
        delay(50);
        digitalWrite(LED0, !LOW);
        delay(550);
        Serial.print(".");
      }
      Serial.println("");
    }

  // Stop Blinking To Indicate Connected ----------------------------------
    digitalWrite(LED0, LOW);
    Serial.println("\n!-- Client Device Connected --!");
    Serial.print("\n\n");

    // Printing IP Address --------------------------------------------------
    Serial.println("Connected To      : " + String(WiFi.SSID()));
    Serial.println("Signal Strenght   : " + String(WiFi.RSSI()) + " dBm");
    Serial.print  ("Server IP Address : ");
    Serial.println(qwertyServer);
    Serial.print  ("Device IP Address : ");
    Serial.println(WiFi.localIP());

    // Conecting The Device As A Client -------------------------------------
    ClientRequest();

  }

//====================================================================================

  void ClientRequest()
  {
    // First Make Sure You Got Disconnected
    qwertyClient.stop();

    // If Sucessfully Connected Send Connection Message
    if(qwertyClient.connect(qwertyServer, 23))
    {
      delay(250);
      Serial.print("status\n");
      Serial.println    ("Connected");
      qwertyClient.println ("Connected");
    }
  }

This is the code I am currently using, with some simple modifications.
then I would need to change the IP of (qwertyServer) to a DDNS address, does a

Daleon L
@Allwaysawake
For whom me...?
ZaPpInG
@lrmoreno007
Hi all, I have created some scripts to easily download or update both ESP32 and ESP8266 Arduino cores from Windows, git versions. I don't know if you see them interesting to reference them from the documentation.
https://github.com/lrmoreno007/ESP-Easy-Updater-for-Windows
Pavel Hübner
@hubpav
Hi everyone, please let me inform that we have recently launched a new DIY / open-source embedded platform for makers. It is called BigClown and it was specifically designed for IoT. It features wireless communication in 868 / 915 MHz band and it is optimized for low-power operation. You can build real home automation items with it right away. Now it is available on Indiegogo (campaign link: http://bit.ly/2EfhbHB). I will be happy to hear your feedback. Thanks a lot!
Saboor Malik
@ProgrammingForFun01
Hello
I wonder if anyone could explain this code in C++/Arduino.
Saboor Malik
@ProgrammingForFun01
int led = 4;
int speed = 100;
void setup(){
pinMode(2, INPUT);
pinMode(12, INPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
}
void loop(){
if (digitalRead(2) == HIGH){
  speed = 50;
}
else {
  speed = 150;
}
if (digitalRead(12) == HIGH){
digitalWrite(led, HIGH);
} else {
  digitalWrite(led, LOW);
led = led + 1;
if (led > 8) {
led = 4;
}
  digitalWrite(led, HIGH);
  delay(speed);
}
}
I do not understand about these speed set to 50 or 150 in the if statements
But I was typing this and I think I get it.. I did not see the 'delay(speed)' at the end. So if pin 2 is HIGH (on) and speed will contain 50 otherwise speed will contain 150. Then digitalWrite(led, HIGH) will be on depending on the speed (seconds).
Myles Eftos
@madpilot
If what ever is connected to pin 2 is high, then toggle the LED, and wait 50 milliseconds. If it is low, toggle the LED and wait 150 milliseconds
Saboor Malik
@ProgrammingForFun01
Oh ok I get it, I don't remember what pin 2 is but pin 12 is the push button, so if I push the button then the pin 4 will be high otherwise pin 4 will be low but only things that I am confused is why there is led = led +1 if pin 4 is low. I understand that led increase by 1, between pin 4 to 8.
if pin 12 is low*
Myles Eftos
@madpilot
I assume you have 5 LEDs wired up to pins 4, 5, 6, 7, 8
Saboor Malik
@ProgrammingForFun01
Yeah
Myles Eftos
@madpilot
Every time it loops through the code, it accesses the next LED in the sequence.
After it talks to the LED on pin 8, it goes back to the LED on pin 4
Saboor Malik
@ProgrammingForFun01
Ok I understand that part
Ok, I am just guessing, if I press and hold the push button then not press then it randomly pick any led between 4 to 8 to be high?
Myles Eftos
@madpilot
I think the delay is on the wrong line.
If the button is pressed, it stops on an LED
Saboor Malik
@ProgrammingForFun01
oh yeah