Ltd. Control <Multifunctional bluetooth controller>

145 views
Skip to first unread message

Kon

unread,
Jun 28, 2017, 4:09:08 AM6/28/17
to mitappinv...@googlegroups.com
Hello everyone,


I want to share with you my first app, called Ltd. Control. Although many apps which can be used to communicate with the bluetooth receivers (HC-06, HC-05, HC-10) already exist, they often lack some features that I wanted and so I created my own app.

The key feature here: A SNES button layout that can be repgorammed with any wanted ASCII character that is sent on button press.

First, make sure to connect to your bluetooth receiver with a button press on BLUETOOTH and selecting the receiver. Make sure your phone's bluetooth is turned on. Once you connect, the BLUETOOTH button will appear with green letters. Then go to the CTRL tab.

Basically, all buttons on the CTRL tab send one char byte when they are clicked. However, on long-click they reprogram their value to match the value currently entered in the text box below the buttons. Very simple, very powerful.

However, I included some more features in my app: the TXT tab, the DPAD tab and the DATA tab.

In the TXT tab you can send any text you want (the text will be sent char by char).

In the DPAD tab you have a big DPAD button layout for more accurate clicking.

In the DATA tab I connect to the phone's internal clock to receive time&date and also to the openweathermap.org api, getting the current temperature&humidity. All this data can be send with a button click on SEND DATA VIA BLUETOOTH. If you open the blocks you see that I use some code byte's before I sent weather information etc. This is due to my private project where I need to identify which data is being sent.

There is one field in the blocks called openweatherURL. Here, you need to replace the CITYID placeholder with the city's ID of your interest and you should register for your own API key which you replace at the end of the link. Please don't ask me for further information about these steps, they are all explained very well at openweathermap.org already.

If you don't need the temperature&humidty information just go ahead and download the APK. It will give you all the functionality that I described above.

If you want to tinker with the project files, go ahead and download the .aia files.

Have fun and any feedback is appreciated :)




Ltd_Control.aia

Evan Patton

unread,
Jun 28, 2017, 10:29:09 AM6/28/17
to MIT App Inventor Forum
This is a good demonstration of how App Inventor can be used to interact with different external hardware and software. Great job!

Evan

One minor note: Board policy forbids posting built APKs due to the fact that they can be modified after-the-fact to host malicious software. I've removed the APK but anyone is welcome to download the AIA to compile the app for themselves.

Abraham Getzler

unread,
Jun 28, 2017, 2:39:39 PM6/28/17
to MIT App Inventor Forum
I've added this to the FAQ at 
under the Web API section for Openweathermap, mentioning
the BlueTooth control.

Is there a matching .ino file needed for the hardware side?

ABG

Kon

unread,
Jun 28, 2017, 10:14:25 PM6/28/17
to mitappinv...@googlegroups.com
@Evan Patton thanks for the feedback :)

I wasn't sure whether the apk would be allowed. Thanks for letting me know!

@Abraham Getzler thanks for including me in the helpful FAQ. Regarding the hardware side: I don't use arduino but the pure AVR microcontroller (ATmega128). Thus, I set all the necessary serial comm. setting bits manually in my code. If someone needs help and wants to see my serial comm initialization or interupt routine, I will gladly share it here :)
Reply all
Reply to author
Forward
0 new messages