hello,
i want make one of the gpio of esp32 high when user give command through mobile app.
first of all i am using examaple 14_gatt_server code to connect with my mobile then i am giving any command through BLE Scan app it will receive on the board in the hex format.
Now i want to make high any one gpio of esp32 when this command received on the ESP32 board.
Anyone can tell how can i do this ? because i am very new to esp32 and for freertos too.
Please help me.
Want to make one of the GPIO of esp32 high on receving command
-
- Posts: 14
- Joined: Mon Jan 09, 2017 12:13 pm
Re: Want to make one of the GPIO of esp32 high on receving command
hitanvipatel wrote:hello,
i want make one of the gpio of esp32 high when user give command through mobile app.
first of all i am using examaple 14_gatt_server code to connect with my mobile then i am giving any command through BLE Scan app it will receive on the board in the hex format.
Now i want to make high any one gpio of esp32 when this command received on the ESP32 board.
Anyone can tell how can i do this ? because i am very new to esp32 and for freertos too.
Please help me.
how your routine look for the
here you can filter your receive and build a switch... i am giving any command through BLE Scan app it will receive on the board in the hex format...
in the case that you list for the received command
you put your code for this into.
setup the gpio for output like you want to use..Now i want to make high any one gpio of esp32 when this command received on the ESP32 board...
setup the output to LOW.
now when your command is received and true over the case you switched,
set the gpio then high.
example of gpio:
This test code shows how to configure gpio and how to use gpio interrupt
the interrupt you do not need perhabs, but you can study this for next doings, example you want switch a gpio for send ble command?..
hope this helps.
how you can use switch / cases
perhabs you are beginner in code - so perhabs this helps
the api for commands you can read example here
explizit gpio is here
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
-
- Posts: 14
- Joined: Mon Jan 09, 2017 12:13 pm
Re: Want to make one of the GPIO of esp32 high on receving command
rudi ;-) wrote:hitanvipatel wrote:hello,
i want make one of the gpio of esp32 high when user give command through mobile app.
first of all i am using examaple 14_gatt_server code to connect with my mobile then i am giving any command through BLE Scan app it will receive on the board in the hex format.
Now i want to make high any one gpio of esp32 when this command received on the ESP32 board.
Anyone can tell how can i do this ? because i am very new to esp32 and for freertos too.
Please help me.
how your routine look for the
here you can filter your receive and build a switch... i am giving any command through BLE Scan app it will receive on the board in the hex format...
in the case that you list for the received command
you put your code for this into.
setup the gpio for output like you want to use..Now i want to make high any one gpio of esp32 when this command received on the ESP32 board...
setup the output to LOW.
now when your command is received and true over the case you switched,
set the gpio then high.
example of gpio:
This test code shows how to configure gpio and how to use gpio interrupt
the interrupt you do not need perhabs, but you can study this for next doings, example you want switch a gpio for send ble command?..
hope this helps.
how you can use switch / cases
perhabs you are beginner in code - so perhabs this helps
the api for commands you can read example here
explizit gpio is here
best wishes
rudi
Thanks ruddi
I have done it..
But now i have to pair my android device and ESP32 .. so for paring what should i do??
I used example 14 of esp-idf ,but using that they will only connect with each other not paired.. i need to do paring between them
how can i do that??
Please help me
Thank You
Who is online
Users browsing this forum: No registered users and 125 guests