Bitcoin lets you exchange money and transact in a diffrent way and they should be given the same security as your wallet, or even more! The price of a bitcoin can unpredictably increase or decrease in a short period of time.
To be a successfull trader, being regularly updated about price changes is absolutely important because of the volatility of cryptocurrency markets.
So this projects lets you track the ever fluctuating bitcoin prices in the currency suitable to you, So there is no more need to check the website for bitcoin prices, you will be notified whenever there is an increase or decrease in the bitcoin market price with respect to the price specified by you.
Before moving forward lets peep into the working of the alert system so following is a short video made by me stating all the necessary details. It basically shows how will the modelwillwork, so have a look.
It amy be possible that some of you might be already knowing the installation process so, they can directly scroll down to Explanation of Project section down below after installation section.
INSTALLATION:1) SIGNING-UP TO BOLT:
Bolt cloud is a server which lets you communicate with your Bolt WiFi module over the internet. It offers features like receiving and storing the data collected by Bolt Modules, Storing the data, Analysing it via Data visualisation and Machine Learning as well as it lets your program your Bolt modules. let us create an account on Bolt cloud. Bolt cloud is a server which lets you communicate with your Bolt WiFi module over the internet. It offers features like receiving and storing the data collected by Bolt Modules, Storing the data, Analysing it via Data visualisation and Machine Learning as well as it lets your program your Bolt modules.
Follow the steps below:
Registration Process- Step 1: Open www.cloud.boltiot.com on your web browser (Google Chrome recommended)
- Step 2: Click on "SignUp” as shown below
Step 3: Enter your details in the SignUp page shown below. Enter your name, email id (login ID for Bolt cloud), and password in the fields. Do confirm your password by typing it again in the Confirm Password field and then click on the Register button.
Step 4: Verification of your account: If you have entered all the details correctly, you will be successfully registered on Bolt Cloud and you shall see the screen below.
You will be sent a Verification Mail to your mail Id as seen below (Please check your Spam folder if the mail is not found in your Inbox.
Note: If you did not get the Verification mail you can go to cloud.boltiot.com and SignIn and Click on the Resend Email option marked below.
Open the mail and click on the “Click here to verify your E-mail ID” button as shown below.📷
Once you click on the button, your email id will be verified and you will be directed to the following page thus completing the registration process on Bolt Cloud.
- Step 5: You will be redirected to your Bolt Cloud Dashboard, with the Welcome message greeting, where you can click on the Getting Started button to view the guide.
- Step 6: You will be given a basic tour of the Bolt Cloud features on the Dashboard. You can click on the Next & Back button to view the features. You can click the Skip button to skip the tour if you wish to. The tour can be taken anytime by clicking the “Take a Tour” button at the top right corner on your dashboard.
Twilio is a third-party SMS functionality provider. It is a cloud communications platform as a service (PaaS) company. Twilio allows software developers to programmatically make and receive phone calls and also send and receive text messages using its web service APIs.
Please note that SMS delivery via a trial Twilio account is not guaranteed to be instant by Twilio. Also, note that SMS will not be sent to numbers which have DND(Do Not Disturb) turned ON.
Creating an account on TwilioStep 1: Open https://www.twilio.com/ in browser.
Step 2: Click on Get a Free API Key
button to sign up.
Step 3: Fill all the necessary details in SIGN UP form. Below is the screenshot of filled sign up form.
Step 4: To verify they will ask for your phone number. Choose India as an option in the dropdown and then enter your phone number.
Step 5: Click on "Products" as shown on the screen below,
Step 6: Now enable the SMS services by clicking on two checkboxes for Programmable SMS and Phone Numbers as shown below.
Once you have done this, scroll to the bottom of the screen and click on "Continue".
Step 7: Now, you will need to give a name for your project. I have given the name as My Project. Click on "Continue" once you have entered the project name.
Step 8: Click on "Skip this step" when it asks you to Invite a Teammate.
Step 9: Your project should be created at this point. Click on "Project Info" to view the account credentials which is required for your projects.
Step 10: You can view the Account SID and Auth token on this page. The Auth token is not visible by default, you can click on "view" button to make the Auth token visible as shown below. Copy both and save them somewhere securely.
Step 11: From the drop-down menu, choose "Programmable SMS". Now click on Get Started
button to generate phone number.
Step 12: Click on Get a number
button.
Step 13: Then a popup will appear. Click on Choose this number
button.
Step 14: Then a popup will appear which will have the final number. Copy this number and save to notepad for future references.
So now your twillio account is ready to get started.
SIGNING IN TO MAILGUN:Step 1: Open https://www.mailgun.com/ in browser.
Step 2: Click on Sign Up
button.
Step 3: Fill all the necessary details in SIGN UP form. Make sure you are unchecking the payment option. Below is the screenshot of filled sign up form.
Step 4: You will get a verification mail having a link. Click on that link to verify your mail.
Step 5: To verify they will ask for phone number. Choose India as an option in the dropdown and then enter your phone number.
Step 6: After verification, scroll down to Sandbox Domain
section. Click on Add Recipient
button.
Step 7: Click on Invite New Recipient
button.
Step 8: Enter the Receipient Email ID. In this case enter your Email ID.
Step 9: After adding Email ID a new sandbox will be generated. Click on the ID of the newly generated sandbox. Refer below image for the same.
Step 10: The new screen will have all the necessary credentials that you want for sending an email. Copy all this credentials and save in the notepad.
That's it. You have successfully created the account on Mailgun.
EXPLANATION OF THE PROJECT:As the purpose of the project is already explained in the introduction section, now will mainly focus on assembling the circuit and writing proper code for the working of our project.
(a)Assembling the circuit:
You can take reference from the circuit diagram given in the diagram section for exact connections however after making connections your circuit looks like this, the stable blue and green led's symbolises module has proper cloud access and is connected to hotspot and has power supply.
- We have connected the postive pins of buzzer to pin 1 of module and led to pin0 of module respectively and their negative pins to GND.
- power on the module and connect it to hotspot using bolt smartphone app.
(b) Writing the code:
- In the following block of code we have imported important files like json for converting python dictionary to json strings, time to return the number of seconds passed since epoch and conf is the file containing private api keys and tokens.
- Now to fetch the data from Bolt Cloud, we will create an object called 'bolt' using which you can access the data on your Bolt.
- For the Bolt Cloud to identify your device, you will need to provide the API key and the Device ID when creating the mybolt object. Since the conf file holds the API key and Device ID variables, you can use them as follows,
The below code will automatically fetch your SID, ATOKEN, TO_NUM and FROM_NUM that you have initialized in conf.py
file. Make sure you have given correct value in conf.py
file.
This inputs the user demands for bitcoin
Below is the function definition to check the current bitcoin market value and return the corresponding to user.
This is the main code block below which incorporates the function price_check and checks the condition whether the selling price entered by user is less than or greater than the current bitcoin market value and gives the user alert in both cases.
Message and email is generated in both cases stating diffrent reasons but LED glows when current bitcoin market value is lesser than selling price as shown
and Buzzer beeps when current bitcoin market value if greater than user's selling price.
The complete code is wrriten althrough in the code tab below.
OUTPUTIn the above image user is asked to enter the corresponding country currency in which he/she wants to invest.
In the above output window after entering the selling price he/she can get current bitcoin market value directly and after comparision of current bitcoin market value with selling price the output message and mail are sent to the user and output is also displayed on the breadboard.
The following is the output at breadboard:
And the following are the screenshots of messages and e-mail at user's smartphone after inputing diffrent values of selling price at various currencies:
And below is the alert message at mailgun :
So here it was all from my side. Ihave done my best considering each section.In case you have any doubt, ask me in the comment section.
Thankyou!
Comments