How do i connect a ESP 32 with thunkable to a servo

Hello People,

I want to make an app which can set a servo into 2 different degrees.
My little boy has a wooden train track and i want to make an app that can flip the track into righthru and left/right so he can use his ipad or phone to play with the tracks.
The hardware i all have and its working, only thing is i see a lot of examples where the bluetooth module HC-05 or 06 is used but i dont want that.
I think the ESP32 is very useable for this project cause of the onboard wifi and bluetooth.

Does someone have the experience or does someone know how to make an app for this with thunkable ?

What i need is a slider or on/off knob which set the servo in a saturn degree and back to zero…
then i want to expand the app with more servo’s so my son can play with more tracks

I hope someone can help me out, been on a lot of youtube movies and sites, but sadly there is less to find how to control a servo with thunkable or other app

https://x.thunkable.com/projectPage/658b10e20a409e834fa3af17
this is what i made till now, i want thus the slider to make the servo turn , one slider for one servo and then hook it all up to the ESP32 and control it true bluetooth
greetz
Martijn

Hi @martijnmpmnf5, welcome to Thunkable! :tada:

Be sure to check out our posts about How to ask Great Questions v2.0 and our Community Guidelines as you get started.

I am not familar with a Servo but from looking at this site, you can connect via BLE to the servo and simply send out the angle value that you want the arm to turn and it would.

Keep in mind, with Thunkable, you’d have to use Bluetooth Low Energy to connect to the board as we unfortunately do not currently support connecting via WiFi.

Thanks matt
But this is not exactly what i want…
I want to make and use the app for controling the servos …
In use with a Esp32

Greetz

I suppose I might be a bit confused here. The app I am suggesting would do just that. The Servos is wired up to the ESP32 and you can connect to the ESP32 via BLE and transmit data to the ESP32 which will control the Servos? Is that not what you are wanting?

not exactly, i want for every servo one slider or knob that turns the servo into 2 posttions , u can see it as on off
when the slider or knob is used the servo goes to a certian postition and when used again it goes back to the other position and so on…

Thanks for your help

Martijn

What’s the holdup for you? You’ll need to code your device to accept these commands, decide upon the packet of info you’ll send to transmit commands, hook your stuff up.

I dunno what u mean?
i made this for now and want the sliders to set a certian degree 0 degree for rightthru, near 30 degree for going left or right
https://x.thunkable.com/projectPage/658b10e20a409e834fa3af17

greetz

In that case, you could easily set the slider to have a range of 1-3, where 1 could be the position for left, 2 for straight thru, and 3 for right. You could add some conditionals into the blocks so that the value of the slide can coordinate with the value sent to the Servo.
Screenshot 2023-12-28 at 2.40.38 PM