Hi to All
I am looking for commands to control an Android or Iphone with an ESP32 via Bluetooth.
There are already small cheap devices that do that.
But I would like to fire two additional flashing LEDs with the ESP32. These LEDs are small and very bright for a short time.
Does anyone know this Bluetooth command code?
regards
Stefan
Sample small device.
ESP32 Bluetooth command to take a picture
-
- Valued Contributor
- Posts: 997
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
-
- Valued Contributor
- Posts: 1453
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 707 times
Re: ESP32 Bluetooth command to take a picture
Hi Stefan,
I guess you would need a small app running on the phone - I've thought about this for photography and have seen the remote shutter switches. I'm also trying to think of a way to interface a bike radar to an esp32 - rather than having my phone strapped to the handlebars.
It might be possible to look at the Bluetooth traffic and see what data is being transferred. It would be fairly easy if can connect to a PC not so easy if it's BT LE?
Martin
I guess you would need a small app running on the phone - I've thought about this for photography and have seen the remote shutter switches. I'm also trying to think of a way to interface a bike radar to an esp32 - rather than having my phone strapped to the handlebars.
It might be possible to look at the Bluetooth traffic and see what data is being transferred. It would be fairly easy if can connect to a PC not so easy if it's BT LE?
Martin
-
- Valued Contributor
- Posts: 997
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
Re: ESP32 Bluetooth command to take a picture
Hi Martin
It's not using an app. Just connect to the Iphone or android phone. You have to open the camera and thats all.
If you press the button it's focus and take the picture. If you press the button long it's take a video.
I don't know if it's a remote profile or SPP, but not BLE
I'll keep looking and keep you informed.
For your bike radar I can recommend that to you:
https://www.mouser.ch/ProductDetail/M5S ... 52BQ%3D%3D
I used it and post a Demo. It's include a akku, screen, USB C , Bluetooth and many many accessories such as holders or straps
and very easy to use with Flowcode
https://flowcode.co.uk/forums/viewtopic ... f=5&t=1452
regards
Stefan
It's not using an app. Just connect to the Iphone or android phone. You have to open the camera and thats all.
If you press the button it's focus and take the picture. If you press the button long it's take a video.
I don't know if it's a remote profile or SPP, but not BLE
I'll keep looking and keep you informed.
For your bike radar I can recommend that to you:
https://www.mouser.ch/ProductDetail/M5S ... 52BQ%3D%3D
I used it and post a Demo. It's include a akku, screen, USB C , Bluetooth and many many accessories such as holders or straps
and very easy to use with Flowcode
https://flowcode.co.uk/forums/viewtopic ... f=5&t=1452
regards
Stefan
-
- Valued Contributor
- Posts: 1453
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 707 times
Re: ESP32 Bluetooth command to take a picture
Looks like the Bluetooth 'clickers' act a small BT keyboard - with 'Enter' as the (only) key to take a photo.
See https://stackoverflow.com/questions/267 ... 20Marc%20B
Thanks for the pointer on to the M5Stack - looks ideal (if it's 'reasonably' waterproof) - I was thinking of just a couple of multicolour LEDS (off clear, yellow car at distance - red (and sound) close)
Martin
See https://stackoverflow.com/questions/267 ... 20Marc%20B
Thanks for the pointer on to the M5Stack - looks ideal (if it's 'reasonably' waterproof) - I was thinking of just a couple of multicolour LEDS (off clear, yellow car at distance - red (and sound) close)
Martin
-
- Valued Contributor
- Posts: 1528
- Joined: Thu Dec 03, 2020 10:57 am
- Has thanked: 353 times
- Been thanked: 549 times
Re: ESP32 Bluetooth command to take a picture
Hi
About six or seven years ago, one Christmas I bought a book "App Inventor for Android" which was published around a decade or so ago. The book detailed how to create android "apps" to interact with pretty much anything. It used "code blocks" so no actual programming knowledge was needed, a bit like Flowcode I suppose.
It documented how to use App Inventor (originally a google product, now MIT) and took you through examples. Didn't take me long to create "apps" and was well worth the purchase price as it kept me from being bored. It covered how to do a fair amount but being fair it isn't designed to take you to expert level but did cover Bluetooth. I created a few "apps" that interacted with a web page I hosted on my laptop using my phone, but it could easily have "talked" with a microcontroller running suitable code.
Maybe it or MIT App Inventor(google) might be of help?
Regards
About six or seven years ago, one Christmas I bought a book "App Inventor for Android" which was published around a decade or so ago. The book detailed how to create android "apps" to interact with pretty much anything. It used "code blocks" so no actual programming knowledge was needed, a bit like Flowcode I suppose.
It documented how to use App Inventor (originally a google product, now MIT) and took you through examples. Didn't take me long to create "apps" and was well worth the purchase price as it kept me from being bored. It covered how to do a fair amount but being fair it isn't designed to take you to expert level but did cover Bluetooth. I created a few "apps" that interacted with a web page I hosted on my laptop using my phone, but it could easily have "talked" with a microcontroller running suitable code.
Maybe it or MIT App Inventor(google) might be of help?
Regards
-
- Valued Contributor
- Posts: 1453
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 707 times
Re: ESP32 Bluetooth command to take a picture
So - using the techniques I mentioned in the esp32 Bluetooth Mesh topic - I added a simple BT keyboard to esp32.
This connects to a PC (you need to pair it) and here has a very (very) simple keycode generator - it takes a string (only handles capital letters and space) - and outputs it as lowercase letters (need to add a 'shift') and (relevant to this topic) a return character (which should (!) fire the shutter) Way back I did a more detailed version for Arduino HID and I'll look this up rather than recreate it.
It required a little extra tweaking compared to the Bluetooth mesh example - so rather than try and post all my steps again (needed a little more modification of the demo file) I've posted my entire directory as a zip. Note that as mentioned before - you'll need to compile and upload outside FC (using 'idf.py build' and 'idf.py -p COMn flash') - you'll need to compile the fcfx file to create the directories (in FC) then paste in the contents of the zip file then use idf.py commands.
The (simple) demo file - outputs Hello World(return) once - it needs a trigger (button / timer whatever) - simply outputting multiple strings makes thinks difficult on the PC.
There is no delay after the chars - depending on your PC it might need say 10ms?? Martin
This connects to a PC (you need to pair it) and here has a very (very) simple keycode generator - it takes a string (only handles capital letters and space) - and outputs it as lowercase letters (need to add a 'shift') and (relevant to this topic) a return character (which should (!) fire the shutter) Way back I did a more detailed version for Arduino HID and I'll look this up rather than recreate it.
It required a little extra tweaking compared to the Bluetooth mesh example - so rather than try and post all my steps again (needed a little more modification of the demo file) I've posted my entire directory as a zip. Note that as mentioned before - you'll need to compile and upload outside FC (using 'idf.py build' and 'idf.py -p COMn flash') - you'll need to compile the fcfx file to create the directories (in FC) then paste in the contents of the zip file then use idf.py commands.
The (simple) demo file - outputs Hello World(return) once - it needs a trigger (button / timer whatever) - simply outputting multiple strings makes thinks difficult on the PC.
There is no delay after the chars - depending on your PC it might need say 10ms?? Martin
-
- Valued Contributor
- Posts: 997
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 190 times
- Been thanked: 217 times
Re: ESP32 Bluetooth command to take a picture
Hi Martin, Hi Lain
Very good thanks Martin. Gladly I will try this.
Thank you too, Lain. I've used MIT App Inventor for various projects but less since Flowcode AppDevelopper exists.
regards
Stefan
Very good thanks Martin. Gladly I will try this.
Thank you too, Lain. I've used MIT App Inventor for various projects but less since Flowcode AppDevelopper exists.
regards
Stefan