Telegram is a freeware, cross-platform, cloud-based instant messaging (IM) software. Telegram accounts are tied to telephone numbers and are verified by SMS. Users can add multiple devices to their accounts and receive messages on all of them. Connected devices can be removed individually or all at once. The associated number can be changed at any time and when doing so, the user's contacts will receive the new number automatically. In addition, a user can set up a username as an alias that allows them to send and receive messages without exposing their phone number.
For our drone control, we will be using a custom Telegram Bot.
Bots are simply Telegram accounts operated by software – not people – and they'll often have AI features. They can do anything – teach, play, search, broadcast, remind, connect, integrate with other services, or even pass commands to the Internet of Things. They can respond to messages or mentions, can be invited into groups, and can be integrated into other programs. There are also inline bots, which can be used from any chat screen. In order to activate an inline bot, the user needs to type in the message field a bot's username and query. People can use Internet Of Things (IoT) services with two-ways interaction for IFTTT implemented within Telegram.
Telegram bot API
It is easy to set up Telegram Bots. There are a lot of tutorials available.
https://core.telegram.org/bots - BotFather
https://core.telegram.org/bots/api - General API
Our custom bot is developed in such a way that it can be accessed directly using its unique name @DroneTellobot or by adding the bot into a group.
If added to a group, all the members of the group can simultaneously use the bot to control the drone. This is very useful in a case for eg. testing the drone as a team.
At the time of this writing, the following commands are programmed into the custom telegram bot.
- /takeoff - drone takeoff
- /land - drone land
- /forward - drone forward
- /back - drone back
- /up - drone up
- /down - drone down
- /left - drone left
- /right - drone right
- /battery - drone battery
- /shutdown- close comm
- /status - bot info
There is the possibility to add more commands which are available with the help of DJI Tello SDK, which will be incorporated soon.