Telegram With Intel Edison and Python
by juliaat in Circuits > Software
1383 Views, 8 Favorites, 0 Comments
Telegram With Intel Edison and Python
This instructables shows you how to configure the Yocto package manager and use a Telegram bot Python library. Although Intel Edison is the target board, it is possible to adapt the following steps to a similar hardware.
Get Started With Intel Edison
Follow the get started steps available at the Intel website to update the board's firmware:
https://software.intel.com/en-us/iot/library/ediso...
How to Configure the Wi-Fi
To have an Internet connection, you should configure the Wi-Fi by running the following command from Yocto's terminal:
configure_edison --wifi
How to Setup Opkg Package Manager
You should create a file in the following path: /etc/opkg/base-feeds.conf with the contents shown below (you may use another repository):
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/edison
src/gz core2-32 http://repo.opkg.net/edison/repo/edison
Afterwards, execute the following command from Yocto's terminal:
opkg update
Install Telegram Python Library
To retrieve the files of the Telegram bot, you should first install python-pip by running the following command:
opkg install python-pip
You may now install the Telegram bot library using pip:
pip install python-telegram-bot
Using Telegram Bot Library
The Telegram bot library installed by the previous step allows you to create a bot which responds to a set of commands sent by an arbitrary user. To get familiar with its functions, you should read the examples in its GitHub webpage as well as its documentation. The links follow:
https://github.com/leandrotoledo/python-telegram-b...
http://python-telegram-bot.readthedocs.org/en/late...
We have implemented an Arduino-Telegram integration script during an Intel IoT Roadshow. It may be interesting to take a look at our code if your scenario is similar to ours. The Python script is inside ./python directory in our GitHub repository: