Menu Close
Spread the love

Bitcoin price alert using an Arduino Nano

Btc Alert Animation
 Youtube Video

Creating a Bitcoin price alert using an Arduino Nano and a Python script can be a useful project for monitoring the value of Bitcoin.

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

Thank you for visiting. If you found this information helpful, please consider subscribing to the Officialhrm YouTube channel and liking their Facebook Page for more updates and helpful content. Don’t forget to share this website with your friends.

Download

File Description Date added File size Downloads
zip Bitcoin BTC Price Alert August 15, 2018 3:51 pm 145 KB 3140
Posted in Arduino

Related Posts

2 Comments

  1. Pingback:Bitcoin Price Notification – bitcoin price

  2. Pingback:Btc Price Alert App - [100% Verified]

Leave a Reply

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