Raspbery Pi based FTC Ticker
-
I’ve been having a bit of play around with python the last few days and put myself together a Raspbery Pi based Feathercoin ‘Ticker’ to display the Feathercoin value in Australian Dollars using the feathercoin API.
It can be easily adapted to other currencies, or to display other information available from the API.
The Raspbery in the photo is my spare Pi, but I plan to put this on my Pi that is running my ASICs as it runs 24 x 7.
The LCD is a cheap 20 x 4 display I got off ebay a while back.
Only downside is it is 5V whilst Raspberry Pi are 3.3V.
I have a Freetronics logic converter on the breadboard so I can connect the disply to the PI safely.
http://www.freetronics.com/collections/modules/products/logic-level-converter-module#.U7eeBLFjEgg
But you can use any logic converters and there are plenty on ebay for just a couple of dollars.
At the moment it is set up every 30 seconds to get the current value of FTC from the API and display it
The low and high values will reset once a week on the beginning of Sunday local time.
The date and time on the bottom is the time it last got the values from the API.
Happy to share the code if anyone is interested, although please be aware this is the first thing I’ve ever coded in python so I’m bound to of done things in the coding that will horrify real coders.
Also does anyone else have a suggestion as to where else I should post this to give greater exposure to Feathercoin?
-
:)) LOL.
No I’ll keep it away from my bed and definitely no alarms on it.
I get woken up enough at night with SMS messages about faults happening at work 3000km from me as it is without getting woken up to tell me to sell now to make an extra 5%.
In reality I only really did it for something to do.
I’ve been looking for a reason to learn Python and the feathercoin API just gave me the inspiration to do it.
-
Wow that looks great. Maybe popping it on the bitcointalk forum as there are a lot of alt crypto users who might be interested in your work. You can imagine this would be a useful addition to the feathercoin ATM.
-
You can imagine this would be a useful addition to the feathercoin ATM.
I would rather say “necessary” or “perfect” addiction to the FTC ATM! Live price… everytime. It’s just perfect!
Better to contact Uncle Muddy? He looks more busy in the real world right now though…
-
What’s the best way to make the code available.
Anyone know a free file share website to use?
If you want to try it and have a spare Raspbery PI the first thing you need to do is set it up for i2C.
Adafruit has a great howto on doing this
https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c
You also need the python library ‘requests’ which can be downloaded from here
-
Why don’t you try out Github??
It’s just a second to set-up an account! Check it out.
-
Github is pretty good and quite standard for open source software. Its free and available to anyone. So might be perfect for this. It’s where bush keeps the open source code for the wallet and also the Feathercoin software!
-
Set up an account but, before I upload the code there I want to ask an etiquette question.
Three of the modules I did not develop, one was from Uncle Muddy, and two came from the Raspberry Pi forum.
Is just giving the people who originally created and posted the code credit in the module considered good enough or should I also provide links to where it came from?
-
Ok its up on github
https://github.com/tmuir12/FTC_Ticker
To be clear I did not create the i2c_lib.py or lcddriver.py
They came from here
http://www.raspberrypi.org/forums/viewtopic.php?f=32&t=34261&p=378524
Posted by natbett, but he did not give credit to original author, so I don’t know who wrote them.
The ftcapi.py can from a post on this forum by Uncle Muddy
-
This is great!
You can claim your money in giveaway now ;)
-
This is awesome, its so neat :)
-
Is just giving the people who originally created and posted the code credit in the module considered good enough or should I also provide links to where it came from?
I don’t know… actually if you mention them in the header of the module it should suffice.
However, putting the contributions in a more prominent poistion could be better, don’t you think? What about the Readme.md? You can create a section called “contributors” or whatever fits the case and put down a list of name-address for each source.
-
I’ve given Uncle Muddy credit in the header in the API module, not sure what to do for the LCD modules, as the person that posted them up in the Raspberry Pi forum states he didn’t write them, rather someone else ported them from an arduino library, but doesn’t state who did.
I’ll make not of this in the readme file that if the creater comes forward happy to give them credit.
Edit
Think I found the original creator of the i2c and lcddrive modules on github and have given him credit in the Readme.
-
Great stuff well done mate!
-
Thanks, got it now hooked up onto one of my Pis that doesn’t get shut down and set it to autostart it on power up.
Now I can let it run for a few days and check it all works correctly.
-
It only took it to run to midnight and it stopped due to a typo I made with a variable that is checked at the beginning of Monday.
Today I realised I had forgot to do formatting to allow for values that needed less than 4 decimal places when FTC dropped to 0.04 AUD and screwed up all the formatting on the LCD.
That is now also fixed. Hopefully that has now caught all the bugs.
I’m enjoying playing with the API.
I think my next project will be a ‘Proof in Concept’ on using FTC to pay for credits on an arcade machine.
I don’t have an arcade machine to hook it up to so it will just be a proof of concept and will just trigger a relay to light a LED.
-
great idea. Looking forward to seeing your progress. :)
-
Humm very interesting :) I think I need to compile some thoughts and get back to you on where this could be taken next :)
Thanks for the code mention
UM
-
awesome work! :D
-
Humm very interesting :) I think I need to compile some thoughts and get back to you on where this could be taken next :)
Thanks for the code mention
UM
No problem.
I think I’ve got the basics of the coding sorted for the arcade machine to add credits, but there will be a delay on the rest as I need to put together the relay driving circuit and I’m thinking I might use a display to put up the QR code so its not visible when the machine is turned off, to stop people from accidently putting credits in when machine is off like they could if I just used a printout of the QR code.