logo elektroda
logo elektroda
X
logo elektroda

D1 mini module - ESP8266 WIFI launch, start from IoT, Blynk, Thingspeak

TechEkspert 35244 43
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 18661920
    TechEkspert
    Editor
    I checked it in a scenario where the module was connected to a router that was a Wi-Fi AP sharing the internet.
  • ADVERTISEMENT
  • #32 18662015
    TDA2593
    Level 9  
    I do not have much experience in this topic. Does the WiFi module need to see the router's network? What exactly does AP abbreviation mean? Sometimes I connect to the Raspberry, with a dedicated soft directly via a cell ... Regards.
  • ADVERTISEMENT
  • #33 18662255
    inot
    Level 37  
    Quote:
    Does the WiFi module need to see the router's network?

    It's rather the opposite. The module should register with the router.

    See how the module reports through the serial port (USB).
    AP = access point.
  • #34 18662603
    TechEkspert
    Editor
    AP, i.e. a WiFi access point that provides internet connection, such as in hotels or at McDonald's, to which you connect, for example, with a smartphone or laptop. If you log into the router with the AP, you can see what the module does in the log. Information from the module's serial console (via USB) can also be useful.
  • #35 20587997
    blazrech
    Level 4  
    Hello. Can this be extended to say 4 relays? And to enable each separately. And control from app like this one way. Thanks in advance for your answer.
  • #36 20588209
    TechEkspert
    Editor
    Can be.
    Let's see what AI has to say.

    @ElektrodaBot Write the code for Arduino on the ESP8266 board that will control 4 relays through the blynk application on your smartphone.
  • #37 20588214
    blazrech
    Level 4  
    Thanks a lot for your answer. How should I understand the code I will write a bot?
  • #38 20588216
    TechEkspert
    Editor
    We'll see what he writes, you can compare it with the code from the first post.
  • ADVERTISEMENT
  • #39 20588219
    ElektrodaBot
    AI OpenAI ChatGPT4
    TechEkspert wrote:
    Write code under Arduino for a board with ESP8266 that will allow 4 relays to be controlled via the blynk smartphone app.
    To write such code to Arduino for a board with ESP8266 and control 4 relays via the Blynk app, follow the steps below:

    1. make sure you have all the necessary libraries installed, such as ESP8266WiFi, BlynkSimpleEsp8266 and ESP8266WebServer. You can install these using the Arduino IDE Library Manager.

    2. go to the Blynk app on your smartphone and create a new project. Give it a name, such as "Relay Controller". Select the ESP8266 board as the target device.

    3. add 4 buttons to your Blynk project and assign them virtual pins, e.g. V1, V2, V3 and V4. Set each button as a switch (SWITCH).

    4. send the project authorisation code to your email address.

    Now we can move on to writing the code for the Arduino:

    Code: text
    Log in, to see the code
    .

    5 Replace the values "Your_authorisation_code", "Your_WiFi_network_name" and "Your_WiFi_network_password" with your own data.

    6. upload the code to the board with the ESP8266 using the Arduino IDE.

    Now that the code has been uploaded to the board, you should be able to control the 4 relays using the Blynk app on your smartphone. Make sure the relays are correctly connected to pins D1, D2, D3 and D4 on the ESP8266 board.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #40 20588246
    blazrech
    Level 4  
    What does this line in the code mean?
    char auth[] = "Your_authorization_code";
    What do you need to enter here?
  • ADVERTISEMENT
  • #41 20588389
    TechEkspert
    Editor
    The token for blynk, after installing the application and entering the e-mail, comes to the inbox.

    @ElektrodaBot how to get a token for the blynk application that allows you to control IoT devices and what are the limitations of the free blynk version?
  • #42 20588396
    ElektrodaBot
    AI OpenAI ChatGPT4
    TechEkspert wrote:
    how to obtain a token for the blynk app allowing control of IoT devices and what are the limitations of the free version of blynk?
    To obtain a token (authorisation code) for the Blynk app, follow the steps below:

    1. Download and install the Blynk app on your smartphone (available on Android and iOS).
    2. create a new account in the Blynk app using your email address and password.
    3. Once logged in, click "New Project".
    4. give your project a name, select the device you want to control from the list (e.g. ESP8266) and then select a connection (e.g. Wi-Fi).
    5. click "Create Project". A token (authorisation code) will be automatically generated and sent to your email address.
    6. check your email inbox to find an email from Blynk with the authorisation code. Copy the token and use it in your own Arduino code, ESP8266, etc.

    If you need to access the authorisation code in the future, you can do so by going to the settings of your Blynk project (cog icon) and selecting "E-mail all auth tokens".

    Limitations of the free version of Blynk:

    1. number of devices: In the free version you can only add a limited number of devices. If you want to add more devices, you must upgrade to the paid version of the app.
    2. Number of widgets: The free version of Blynk allows you to add a limited number of widgets to your project. If you want to add more widgets, you need to purchase more "Energy Points" or switch to the paid version of the app.
    3. Lack of support for some features: Some advanced features of Blynk, such as control of devices via the GSM network, are only available in the paid version of the app.
    4. Limited support options: The free version of Blynk does not offer the same level of support as the paid version.
    5. Limited updates and support: the free version of Blynk may not receive all the latest updates and features that are available to users of the paid version.
    You can call me in any topic by writing @ElektrodaBot. Disclaimer: Some answers provided by the ElektrodaBot may be inaccurate. Elektroda not responsible for accuracy, reliability or completeness of the information presented. All ElektrodaBot responses should be verified by the user. OpenAI can monitor and save information entered after calling ElektrodaBot.
  • #43 20594824
    blazrech
    Level 4  
    Hello. Thank you for your help. Everything works ok. The question is, is it possible to somehow set the application so that a given switch is turned on for 20 minutes and then turns off by itself? If so, how to set it up.
  • #44 20595404
    TechEkspert
    Editor
    I don't know in the application, but maybe in the program code it would be possible to change the output state after a certain time?
    I just don't know if it can be synced with the app...

Topic summary

The discussion revolves around the D1 mini module, a compatible clone of the Wemos D1 mini, which utilizes the ESP8266-12E WiFi chip. Users express interest in its compatibility with various IoT platforms like Blynk and Thingspeak, and share experiences regarding its setup and functionality. Key points include the module's ease of use for IoT projects, the importance of using the correct voltage levels (3.3V for ESP8266), and the potential for expanding functionality with additional shields and sensors. Users also discuss issues related to programming, library requirements, and the integration of components like relays and buttons for remote control via Blynk. The conversation highlights the need for proper wiring and code adjustments to ensure seamless operation of connected devices.
Summary generated by the language model.
ADVERTISEMENT