Skip to content

Any plans to port to ESP32 ? #77

@kotopuz

Description

@kotopuz

Dear all,
Not sure if there are any plans to port it to ESP32 ?
Somehow PWM is not working.

Few changes might be needed(I've used dcservoESP_wifi.ino).

  1. Add this and change all BUILTIN_LED to LED_BUILTIN
    int LED_BUILTIN = 2; for dev board.

  2. Change analog write analogWrite(M2,out) to something like ledcWrite(1, out); .
    PWM setup if different:
    ledcSetup(0, 20000, 255); // set PWM to 20Khz ,set PWM to 255 levels
    ledcAttachPin(M1, 0);
    ledcSetup(1, 20000, 255); // set PWM to 20Khz ,set PWM to 255 levels
    ledcAttachPin(M2, 1);

  3. Library change from 8266 to WIFI.h
    //#include <ESP8266WiFi.h>
    #include <WiFi.h>

  4. CHange of ESP32 hostname
    WiFi.begin(ssid, password);
    WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE); // required to set hostname properly
    WiFi.setHostname("your host name");

If someone will make working example please upload.
Mine still not OK, but at least those are needed for sure.

May be I've accidently burned mine ESP32, but hope I will have time to order new one and try again.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions