Introduction: Crypto-notify Using Bolt-IoT

About: Interested in electronics and A.I works

The crypto notify is used to detect the price drop or increase of Bitcoin so we will be setting a fixed selling price thereby if the price increases more than selling price then buzzer is switched on. If the price is less red led is switched-on, if equal orange led will switched-on.

Supplies

Hardware needed:-

BREAD BOARD-mini

Bolt-IoT(wifi module)

Led's x 2 Buzzer x 1

Jumper wires

software needed:-

bolt IoT account

Fritzing for schematics

Step 1: Connect the Buzzer to the Bolt-iot

the buzzer is connected to the bolt it using a breadboard

the negative end is grounded and the positive end is given to pin 1 of bolt IoT

Step 2: Connecting Led's to Bolt-iot

the two LEDs positive pins are connected to 2,3 pins of the bolt-IoT and the negative pins are grounded

Step 3: Whole Connection

in this video you can see the connection of whole circuit

Step 4: Python Code for Thr Bolt-IoT

import json import requests import time from boltiot import Bolt SELLING_PRICE = 17082.93 API_KEY = "your_api_key" DEVICE_ID = "your_device_id" bolt = Bolt(API_KEY, DEVICE_ID) def price_check(): url = "https://min-api.cryptocompare.com/data/price" querystring = {"fsym":"BTC","tsyms":"USD"} response = requests.request("GET", url, params=querystring) response = json.loads(response.text) current_price = response['USD'] return current_price while True: market_price = price_check() print ("Market price is", market_price) print ("Selling price is", SELLING_PRICE) time.sleep(4) if market_price > SELLING_PRICE: bolt.digitalWrite("1", "HIGH") time.sleep(60) bolt.digitalWrite("1", "LOW") elif market_price==SELLING_PRICE: bolt.digitalWrite("2","HIGH") time.sleep(2) bolt.digitalWrite("2","LOW") elif market_price < SELLING_PRICE: bolt.digitalWrite("3", "HIGH") time.sleep(60) bolt.digitalWrite("3", "LOW")

Attachments