Menu Close

Bitcoin price alert

Btc Alert Animation

 Youtube Video

Bitcoin price alert- Arduino NANO and Python script.
sometimes Price Alerts not working on the mobile app!
Get 100% alert when the price goes Above or Below.

price alert

Parts Required:

–  OLED LCD Led-display-module 0,96 “IIC SPI
–  10 Karat ohm Trim Potentiometer 
–  Buzzer / piezo speaker 
–  on/off  Switch 
–  Arduino NANO v3.0 
–  Breadboard 
– Wires to connect it all together

 

Wiring your BTC Price Alert:

 

bitcoin price alert

required library:

– SPI
– Wire
– Adafruit_GFX
– Adafruit_SSD1306

 

Arduino Code:

uper

// Hisham Marzouk
// Officialhrm.com
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);

#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2

#if (SSD1306_LCDHEIGHT != 64)
#error(“Height incorrect, please fix Adafruit_SSD1306.h!”);
#endif

int Buzzer = 2;
int sensorPin = A0;
int Switch = A2;
int Value =0;
float sensorValue = 0;

void setup() {
Serial.begin(9600);

.
.
.
}
Download to get the full code.

Down

 

Python Code USD:

# Hisham Marzouk
# Officialhrm.com

import urllib2
import serial
import re
import time

ser = serial.Serial(port='COM5', baudrate=57600)
ser.close()

opener = urllib2.build_opener()
 opener.addheaders = [('User-agent', 'Mozilla/5.0')]
 url = ('https://blockchain.info/ticker')

if ser.isOpen()== False:
 ser.open()
 time.sleep(1.1)
 while (ser.isOpen() == True):
 oururl = opener.open(url).read()

spl = oururl.split("USD")

spl2 = (spl[1])

spl3 = spl2.split('"last" : ')
 spl4 = (spl3[1])

spl5 = spl4.split(', "buy"')
 spl6 = (spl5[0])

spl7= (spl6)

time.sleep(1)

print(spl7)
 ser.write(spl7)

 

to change the currency from USD to Euro change this Line.

from spl = oururl.split("USD")

to spl = oururl.split("EUR")

 

Download: Bitcoin BTC Price Alert



For more Please make sure to subscribe to Officialhrm YouTube channel and like Facebook Page.
Thank you for visiting officialhrmPlease don’t forget to share this website with your friends.
Posted in Arduino

Leave a Reply

Your email address will not be published. Required fields are marked *