Swadesh Patra
Published © GPL3+

Crypto Alert System Using Bolt IoT (in Windows Environment)

This project makes use of Bolt IoT system to alert the user regarding the Bitcoin prices!

BeginnerFull instructions provided1 hour1,303
Crypto Alert System Using Bolt IoT (in Windows Environment)

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×2
Buzzer
Buzzer
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
Bolt IoT Android App
Bolt IoT Android App
(this app is completely optional for this project... if you have set your bolt cloud account and device earlier)
Bolt IoT bolt python library
VS Code
Microsoft VS Code

Story

Read more

Schematics

Hardware connections to the bolt module

1. connect the longer end of the buzzer in the pin 0 of the bolt Wi-Fi module and the shorter end to the ground. (remember longer end is +ve and shorter end is -ve)
2. no additional resistors are required with the buzzer.

connecting to the bolt cloud and obtaining the bolt API key and Device ID

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.

Download the android app and follow the steps to connect your bolt device to the cloud.

Now, Login to cloud.boltiot.com and note the device ID of your Bolt WiFi Module.
Now click on the API Tab and under the section for Generate Key, click on Enable.

Installing python on windows and writing a code for this project

Download python installer file and install it.
While installing always remember to clickon add to path.
Now on VS code editor/ or any other code editor for that matter write the code.
execute the code on your fav code editor (in VS code right-click then click on "run the python file in terminal".

Code

cryptocurrency

Python
This code is written in python language.
It fetches the price of the bitcoin from cryptocompare website and whenever the price rises above a given threshold It alerts the user.
import json
import time
import requests
from boltiot import Bolt
selling_price = 600000.00
api_key = "0bedea9c-9859-4a0c-8980-cfdc06194a15"
device_id = "BOLT1350134"
mybolt = Bolt(api_key, device_id)

def price_check():
    url = "https://min-api.cryptocompare.com/data/price"
    querystring = {"fsym":"BTC","tsyms":"INR"}
    response = requests.request("GET", url, params=querystring)
    response = json.loads(response.text)
    current_price = response['INR']
    return current_price

while True:
    market_price = price_check()
    print ('market price is: ',market_price)
    print ('Selling price is: ',selling_price)
    time.sleep(10)
    if market_price > selling_price:
        bolt.digitalWrite("0","HIGH")
        time.sleep(60)
        bolt.digitalWrite("0","LOW")

Credits

Swadesh Patra

Swadesh Patra

1 project • 0 followers

Comments