Many times, people face the issue while installing the VMware/VirtualBox and or not able to link their card to Digital Ocean. The reason could be because of their laptop/desktop low configuration for Vmware/VirtualBox or International transactions is not enabled on thier card for Digital Ocean.
The main purpose of installing the VirtualBox/VMware/Digital ocean is to run the python code to control/monitor device. So after trying tall the steps, if you are still not able to use the above services, in that case, you can use the Online IDE to run your python code. The benefit of this is as follow-
- Works on any device
- No setup requires
- Collaboration features
- No need for high configuration laptop
- Easy accessibility of your code
Step. 1. Creating an account on repl
- Sign up an account on https://repl.it/signup
- Verify your email id.
Step. 2. Get the cloud details.
Now down your device id from Bolt Cloud in the text editor. The device will be something similar to BOLT12345
Step. 3. Get the telegram details from the telegram app.
- Create the channel and bot as explained in the training.
- Then open the Telegram app in browser https://web.telegram.org/#/login. It is similar to WhatsApp web. The benefit of opening in the browser is that you can directly copy-paste the access token in your code and can avoid the typo error.
- The text ( for example - https://t.me/testing123rk), after t.me will be used to create chat id.
- Add @ at the beginning of the text and it becomes you chat it. For example "@testing123rk"
- Add bot at the beginning of the access token and it becomes you and bot id. For example "bot870246452:AAHvDx3zeuyO3rDoK9zcYGKt0bTeV7F1GOd"
Step. 4. Creating repl
After verifying your account, you will screen as below. Click on the new repl
Then click on the new repl button,
Then choose Python from the dropdown
Left the Github box blank
Name your repl and click on Create Repl.
- After creating the repl, you will get the screen as below -
- There is a file with name main.py, when you click on run, this file get executed.
print( "Hello I am using repl to run Bolt iot")and click on run, you can see the output in python terminal.
Step. 5: Installing an external library
We need to install boltiot library to run the telegram project, to install the same, go to packages and search for boltiot.
Select the boltiot and click on + icon and it will create a file with name requirement.txt that will store the list of packages you have installed.
Step. 6: Creating file
Click on the create file icon and name it as conf.py and press enter.
Enter your conf.py file code.
Now write your main code in main.py file and click on run button.
Note: Do not share your username or code URL to anyone. Because you are using thier public services and anyone with your link can get access to your code.
- I was able to run all my python program on repl.it
- I am more comfortable in vmware/virtualbox/Digitalocean.
- I was able to run my program on repl.it with some difficulty.