Giter VIP home page Giter VIP logo

Comments (4)

shogunxam avatar shogunxam commented on August 18, 2024

Hi @rcarreira88, could you please explain a bit more your request? Thx

from esp32_bletracker.

rcarreira88 avatar rcarreira88 commented on August 18, 2024

Hi, @shogunxam,
i want to put your code in my mailbox esp32 to send a MQTT command to open door if it detects my smartband MAC address ,
but i also want:
Switch1 connects to GPIO and sends MQTT message and turns on LED connected to a GPIO,
Switch2 connects to GPIO and sends MQTT message and turns off LED.

from esp32_bletracker.

shogunxam avatar shogunxam commented on August 18, 2024

If I have understood you want integrate my code in an existing project. I hope you are a software developer because the work could not so easy if you haven't the proper knowledge.
I think you have to give up the idea to have a web server because my code has already reached the limit of the ESP32 memory.
The project uses this external libraries:

I tried to make the project modular, but the code become a little messed up after the introduction of the support for the FHEM platform.
Main modules are:

  • WiFiManager -> used to access the WiFi
  • mqtt_client -> Used to connect to the MQTT broker and publish messages
  • There are other utility modules such as mutex or NTPTime to get the time and date from a server.
  • In the main module there is the code to scan the BlueToothLE, the core is composed by two pieces one is the class MyAdvertisedDeviceCallbacks where each advertised device is processed, then in the loop function there is the code executing the scan (search for the macro PROGRESSIVE_SCAN). I made two kind of scan one progressive with limited time search and one searching for all the available devices in a longer time range.

If you need also the battery status of the devices follow the batteryTask function.
If you need something simpler take a look to this project
https://github.com/sdesalve/dss_mqtt_binary_sensor_ble_scanner
I started from this project and I evolved it.

About the GPIO I have never worked with them, but googling, I'm sure you will find what you need, in example here you can find how to turn on a led.
https://microcontrollerslab.com/gpio-pins-esp32-led-blinking-example/

from esp32_bletracker.

stale avatar stale commented on August 18, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from esp32_bletracker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.