I wanted to check my balance and the current rate periodically. There was an old raspberry pi 1 which was covered with dust. I decided to make use of it for the Burstcoin. Here is my first burstcoin project with raspberry pi. I used python language for the programming part. 16x2 Display is connected with the I2C module for the communication between the raspberry. Power supply is 5V 0.7A supply. Update: https://bitbucket.org/sleepy1/burst/src
Best posts made by sleepy
-
Raspberry Pi Burstcoin Monitorposted in Development
-
RE: Raspberry Pi Burstcoin Monitorposted in Development
main code regarding the project.
def connect(url,values): data = urllib.urlencode(values) req = urllib2.Request(url, data) try: response = urllib2.urlopen(req) the_page = response.read() final_data = json.loads(the_page) return final_data except: return 0 def main(): lcd_init() lcd_string("Connecting......",LCD_LINE_1) while True: url = 'https://wallet.burst-team.us:8125/burst' values = {'requestType' : 'getAccount', 'account' : 'your numeric account id'} data = connect(url,values) if(data == 0): lcd_string("Error Network",LCD_LINE_1) time.sleep(10) continue balance=float(data['guaranteedBalanceNQT'])/100000000 lcd_string("Bal:"+"{0:.0f}".format(balance)+" BURST",LCD_LINE_1) #========= Get Burst Rate ===================== url = 'https://poloniex.com/public?command=returnTicker' values = {} data = connect(url,values) if(data == 0): lcd_string("Error Network",LCD_LINE_1) time.sleep(10) continue rate=float(data['BTC_BURST']['highestBid']) lcd_string("Rate:"+"{0:.2f}".format(rate*1000000)+" uBTC",LCD_LINE_2) time.sleep(180) -
Accidently I found about Burstposted in Introduce Yourself
Recently while I was inside my car waiting for others to come I read some articles. Then one article mentioned some energy efficient crypto currency which I have never heard of(I knew only bitcoins and few alt coins). At that moment my life turned inside out. Why did not I hear that coin before. Burst is the best coin ever. No need of expensive Graphics cards which are mostly needed for gaming. But hard disk are anyway useful for everyday life. So no waste in terms of hardware and energy.
I hope there should be more large scale advertisements and media involved. -
RE: Monitor assets owned from pythonposted in Development
Assume you want to check all the amount in the wallet and assets in multiple account,
Simple python code to check the grand total. Assuming a local wallet is running.
The addresses of all the burst addresses can be in the BurstAddresses file.Main code , info.py
import time import socket import urllib import urllib2 import json import urllib import urllib2 def connect(url,values): data = urllib.urlencode(values) req = urllib2.Request(url, data) try: response = urllib2.urlopen(req) the_page = response.read() final_data = json.loads(the_page) return final_data except: return 0 file = open("BurstAddresses", "r") addresses = file.readlines() #account_id=input("Account Id:") grand_total_asset_value=0 grand_wallet_value=0 for account_id in addresses: print account_id print("Connecting...") url = 'http://127.0.0.1:8125/burst' values = {'requestType' : 'getAccount', 'account' : account_id} data = connect(url,values) if(data==0): print("Net error!") time.sleep(1) else: total_asset_value=0 for asset in data['assetBalances']: print("") values={'requestType' :'getAsset','asset':asset['asset']} data_asset= connect(url,values) if(data_asset==0): print("Net error!") time.sleep(1) values={'requestType':'getBidOrders','asset':asset['asset'],'lastIndex':'0'} data_bid = connect(url,values) if(data_bid==0): print("Net error!") time.sleep(1) print("asset ID:"+asset['asset']) print("asset name:"+data_asset['name']) asset_bal=float(asset['balanceQNT'])/(10**data_asset['decimals']) print("Qty:"+str(asset_bal)) #print("decimals:"+str(data_asset['decimals'])) try: bid_value=float(data_bid['bidOrders'][0]['priceNQT'])/10**(8-int(data_asset['decimals'])) print("Highest Bid:"+str(bid_value)) asset_value_burst=bid_value * float(asset_bal) print("Value in Burst:"+str(asset_value_burst)) total_asset_value=total_asset_value+float(asset_value_burst) except : print("Highest Bid: None") #balance=float(data['guaranteedBalanceNQT'])/100000000 balance=float(data['unconfirmedBalanceNQT'])/100000000 print("=============================") print("Wallet Balance:"+"{0:.2f}".format(balance)) print("Total Asset Value:"+str(total_asset_value)) print("=============================") values = {'requestType' : 'getBlockchainStatus'} data = connect(url,values) print("Height:"+str(data['lastBlockchainFeederHeight'])) grand_total_asset_value=grand_total_asset_value+total_asset_value grand_wallet_value=grand_wallet_value+balance print("=============GRAND TOTAL============") print("Wallet Balance:"+"{0:.2f}".format(grand_wallet_value)) print("Total Asset Value:"+str(grand_total_asset_value)) print("=============================") print("Net Value:"+str(grand_total_asset_value+grand_wallet_value)) print("=============================")BurstAddresses file
17132087616482062663 10526241997328042230Output
17132087616482062663 Connecting... asset ID:6037211370250490240 asset name:hsassets Qty:51.0 Highest Bid:86.0 Value in Burst:4386.0 ============================= Wallet Balance:218.18 Total Asset Value:4386.0 ============================= Height:340991 =============GRAND TOTAL============ Wallet Balance:218.18 Total Asset Value:4386.0 ============================= Net Value:4604.17629936 ============================= 10526241997328042230 Connecting... asset ID:6037211370250490240 asset name:hsassets Qty:100.0 Highest Bid:86.0 Value in Burst:8600.0 asset ID:16885738494266455518 asset name:SolarGrid Qty:10000.0 Highest Bid: None asset ID:1892701762360056549 asset name:btcdragon Qty:20.0 Highest Bid:70.0001 Value in Burst:1400.002 asset ID:15266167261394017138 asset name:casino Qty:20.0 Highest Bid:473.5 Value in Burst:9470.0 ============================= Wallet Balance:2164.33 Total Asset Value:19470.002 ============================= Height:340991 =============GRAND TOTAL============ Wallet Balance:2382.51 Total Asset Value:23856.002 ============================= Net Value:26238.5088186 ============================= -
RE: Raspberry Pi Burstcoin Monitorposted in Development
Here is the update on the code
def main(): lcd_init() lcd_string("Connecting......",LCD_LINE_1) while True: url = 'https://wallet.burst-team.us:8125/burst' values = {'requestType' : 'getAccount', 'account' : 'your numeric account id'} data = connect(url,values) if(data == 0): lcd_string("Error Network 1",LCD_LINE_1) time.sleep(10) continue balance=float(data['guaranteedBalanceNQT'])/100000000 #========= Get Burst Rate ===================== url = 'https://poloniex.com/public?command=returnTicker' values = {} data = connect(url,values) if(data == 0): lcd_string("Error Network 2",LCD_LINE_1) time.sleep(10) continue burst_btc_rate=float(data['BTC_BURST']['highestBid']) url='https://api.coindesk.com/v1/bpi/currentprice.json' values = {} data = connect(url,values) if(data == 0): lcd_string("Error Network 3",LCD_LINE_1) time.sleep(10) continue usd_btc_rate = float(data["bpi"]["USD"]["rate"].replace(',', '')) burst_usd_bal = balance * burst_btc_rate * usd_btc_rate #display on lcd for x in range(0, 18): lcd_string("Bal:"+"{0:.0f}".format(balance)+" BURST",LCD_LINE_1) lcd_string("Rate:"+"{0:.2f}".format(burst_btc_rate*1000000)+" uBTC",LCD_LINE_2) time.sleep(5) lcd_string("Bal:"+"{0:.3f}".format(burst_usd_bal)+" USD",LCD_LINE_1) lcd_string("BTC:"+"{0:.0f}".format(usd_btc_rate)+" USD",LCD_LINE_2) time.sleep(5) -
RE: Raspberry Pi Burstcoin Monitorposted in Development
Update on my monitor ,
Now it can monitor BTC rate and balance in USD
Display changes every 5 seconds between Burst and USD
Update data every 3 minutes -
RE: Hi.. I didn't do one of these about a month ago sooo...posted in Welcome
Nice, Like your style. Some are common specially "I like dogs more than i like people" , :)
-
Monitor assets owned from pythonposted in Development
I wanted to find out about total owned assets and their total value. So I wrote a python code to get the asset data. No need to enter pass phrase just the numeric account id. The highest bid value quantity is not considered in this code. Need to improve on that in future.
import time import socket import urllib import urllib2 import json import urllib import urllib2 def connect(url,values): data = urllib.urlencode(values) req = urllib2.Request(url, data) try: response = urllib2.urlopen(req) the_page = response.read() final_data = json.loads(the_page) return final_data except: return 0 account_id=input("Account Id:") print("Connecting...") url = 'http://localhost:8125/burst' values = {'requestType' : 'getAccount', 'account' : account_id} data = connect(url,values) if(data==0): print("Net error!") time.sleep(1) else: total_asset_value=0 for asset in data['assetBalances']: print("") values={'requestType' :'getAsset','asset':asset['asset']} data_asset= connect(url,values) if(data_asset==0): print("Net error!") time.sleep(1) values={'requestType':'getBidOrders','asset':asset['asset'],'lastIndex':'0'} data_bid = connect(url,values) if(data_bid==0): print("Net error!") time.sleep(1) print("asset ID:"+asset['asset']) print("asset name:"+data_asset['name']) asset_bal=float(asset['balanceQNT'])/(10**data_asset['decimals']) print("Qty:"+str(asset_bal)) #print("decimals:"+str(data_asset['decimals'])) try: bid_value=float(data_bid['bidOrders'][0]['priceNQT'])/10**(8-int(data_asset['decimals'])) print("Highest Bid:"+str(bid_value)) asset_value_burst=bid_value * float(asset_bal) print("Value in Burst:"+str(asset_value_burst)) total_asset_value=total_asset_value+float(asset_value_burst) except : print("Highest Bid: None") #balance=float(data['guaranteedBalanceNQT'])/100000000 balance=float(data['unconfirmedBalanceNQT'])/100000000 print("=============================") print("Wallet Balance:"+"{0:.2f}".format(balance)) print("Total Asset Value:"+str(total_asset_value)) print("=============================") values = {'requestType' : 'getBlockchainStatus'} data = connect(url,values) print("Height:"+str(data['lastBlockchainFeederHeight'])) -
RE: Quick Linux Questionposted in Mining & Plotting
I prefer Linux over windows. Its stable and no viruses. Windows I always find some bugs at unexpected moments with blue screens and unspecified errors. I only go to windows when there is no option such as games.
-
RE: Dividend and Asset info on the Assets I hold (24 as of today)posted in Asset Exchange
Very useful, thank you
-
RE: Greetings Burstlings!posted in Introduce Yourself
@ZaphodBoone I think its based on nxt. I got to know api with this https://wallet.burst-team.us:8126/test
-
RE: How to setup Amazon Ec2 for walletposted in General Discussion
My newly created instance , downloaded the blockchain and updated
http://35.166.194.163:8125/index.htmlThis is a free tier server just for testing its capabilities.
-
RE: Burstnation & Forksposted in General Discussion
I'm also new to this , but the recent rain of burst made all my transactions lag for hours. I hope this could be a lesson of doing big multiple transactions at once.
-
RE: Hello Burst World :)posted in Introduce Yourself
Burst is all about learning new things everyday...
-
RE: My wallet blew up.posted in Help & Support
mine also went high up like 1GB than earlier , then I remembered I backed up the database folder while the wallet is running, could be the reason. Luckily the backup database was working correctly.
-
RE: QORA asset - NOT ME - I don't know what kind of game this is, but don't purchase this assetposted in Asset Scams
I also got about around 3k assets. Is it real or fake asset. I was surprised when I got an asset early in the morning today.
-
How to find users in my country that use burstcoinsposted in Welcome
I would like to know how many users that use burst coins in our country. Is there a way to do that? I'm from Sri Lanka.



