Skip to main content

Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to
Learn Electronics and Programming with Open Source Hardware and
Software

Courses

Forum

Forum

Ask Question

Shop

Account

Blog

Login

Bluetooth Low Energy (BLE) Android
Application with MIT App Inventor 2 – How the App Works?

Q&A
Forum › Bluetooth
Low Energy (BLE) Android Application with MIT App Inventor 2 – How the App
Works?

0Vote
UpVote
Down

Michael
Frick asked 1 year ago

How can for example a set point be sent to to the client (ex. a set point set
at the phone then sent to ESP32 similar to a high temperature set point that
could be used to turn on the LED)?  Also how could we read the condition of
the LED (ON/OFF) on the ESP32 and send it back to the phone?  Also,
anything on using CSV to read/send data and ON/OFF control?
Thanks! Great
course.

5 Answers

0Vote
UpVote
Down

Rui
Santos Staff answered 1 year
ago

Hello Michael,

You need to create a new field in the BLE App that sends that value to your
ESP32.

Basically, you need to create a new field and a unique CHARACTERISTIC_UUID_X
that is connected to the app to receive that value when it changes. Then, your
ESP32 code receives that value and stores it in a variable.

With some if/else statements, you should be able to use that value to either
turn the LED on or off…

About the CSV, unfortunately I’ve never done anything like that… So I don’t
have any examples or suggestions…

I’m glad you are enjoying the course. Thanks for your kind words!

Regards,

Rui

0Vote
UpVote
Down

Michael
Frick answered 1 year ago

So once you create a “Service UUID” you only need one Service but for each
value you want to send or receive you need to create a “Characteristic UUID” for
each one? Thanks!

0Vote
UpVote
Down

Rui
Santos Staff answered 1 year
ago

Exactly, you only need one “Service UUID” that can have
many “Characteristic UUID”.

0Vote
UpVote
Down

Michael
Frick answered 1 year ago

Here’s an interesting multiple LED control from both the Android device and
push buttons on board.
http://www.martyncurrey.com/arduino-hm-10-and-app-inventor-2/#part3

0Vote
UpVote
Down

Rui
Santos Staff answered 1 year
ago

You could also have just one “Characteristic UUID”, but depending on the
message sent it can control mutiple LEDs. But a better approach is to create
a “Characteristic UUID” for each LED.

Primary
Sidebar

Latest Course Updates

Home
Automation Using ESP8266 – 4th Edition (RELEASED November 6, 2019)
November 6, 2019

[eBook
Updated] Download Learn ESP32 with Arduino IDE Course 1.4 June 17, 2019

You must be logged in to view this
content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2019 · RandomNerdTutorials.com
· All Rights Reserved