Crypto-notify Using Bolt-IoT

by sadiqshaik1 in Circuits > Electronics

445 Views, 0 Favorites, 0 Comments

Crypto-notify Using Bolt-IoT

IMG_20200612_181905.jpg
IMG_20200612_181902.jpg
IMG_20200612_181351.jpg
2020-06-12 (6).png

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

Connect the Buzzer to the Bolt-iot

2020-06-12 (3).png

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

Connecting Led's to Bolt-iot

2020-06-12 (1).png

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

Whole Connection

2020-06-12 (6).png

in this video you can see the connection of whole circuit

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")

Downloads