Want to make one of the GPIO of esp32 high on receving command

tanvipatel
Posts: 14
Joined: Mon Jan 09, 2017 12:13 pm

Want to make one of the GPIO of esp32 high on receving command

Postby tanvipatel » Mon Jan 16, 2017 12:06 pm

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.
Thank You :)

User avatar
rudi ;-)
Posts: 1727
Joined: Fri Nov 13, 2015 3:25 pm

Re: Want to make one of the GPIO of esp32 high on receving command

Postby rudi ;-) » Thu Jan 19, 2017 7:19 pm

tanvipatel 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.
hi

how your routine look for the
.. i am giving any command through BLE Scan app it will receive on the board in the hex format...
here you can filter your receive and build a switch.

in the case that you list for the received command
you put your code for this into.
..Now i want to make high any one gpio of esp32 when this command received on the ESP32 board...
setup the gpio for output like you want to use
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.
-------------------------------------
問候飛出去的朋友遍全球魯迪

tanvipatel
Posts: 14
Joined: Mon Jan 09, 2017 12:13 pm

Re: Want to make one of the GPIO of esp32 high on receving command

Postby tanvipatel » Sat Jan 21, 2017 5:24 am

rudi ;-) wrote:
tanvipatel 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.
hi

how your routine look for the
.. i am giving any command through BLE Scan app it will receive on the board in the hex format...
here you can filter your receive and build a switch.

in the case that you list for the received command
you put your code for this into.
..Now i want to make high any one gpio of esp32 when this command received on the ESP32 board...
setup the gpio for output like you want to use
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