Hive - LCD Notifier

in HiveDevs3 years ago

image.png

A week ago I realized that I spend a lot of time keeping an eye on how much HIVE I have and the daily rewards, so in my profession as a curator I made the decision to make an LCD notifier.

For this assemble some pieces of hardware, use a LCD SMARTIE compatible LCD display with USB, but as I am on linux such software does not work.

looking a little on the internet I found that there is a code in tcl language that makes these screens work very well for which you only have to install tcllib

you can do it with:

apt-get install tcllib
or
dnf install tcllib

after that you only have to run a script which takes a text file and sends its content to the LCD screen in my case the file could only have 4 lines and each line with 20 characters, because I have a screen of 20 x 4.

to fill in that text file that is going to be displayed on the screen, I used PHP,

why..?
Because I love Php and use it for more than 20 years
that's how in less than 70 lines of code I can do everything

image.png

1 Line = Voting Mana
2 Line = Unclaimed Hive and HBD
3 Line = Balance Hive and HBD
4 Line = Actual Time.

This is just a proof of concept because I know that today there are better LCD screens, and better ways to do this but this is my way

Sort:  

Genailllll !PGM

Sent 0.1 PGM tokens to @mchero, @condigital

remaining commands 0

Buy and stake 10 PGM token to send 0.1 PGM per day,
100 PGM token to send 0.1 PGM three times per day
500 to send and receive 0.1 PGM five times per day
1000 to send and receive 0.1 PGM ten times per day

image.png
Discord image.png

Support the curation account with a delegation 10 HP - 50 HP - 100 HP - 500 HP - 1000 HP

Hi, a few hours ago I started a new Witness with my other account , I would be very pleased if you vote for me and support my work... I am going to continue developing software for this blockchain https://ecency.com/hive-167922/@zuun.net/witness - https://vote.hive.uno/@zuun.net -Thank You.!

Congratulations @condigital! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 100 upvotes.
Your next target is to reach 200 upvotes.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Feedback from the February 1st Hive Power Up Day
Hive Power Up Month Challenge 2022-01 - Winners List
Be ready for the next Hive Power Up Month!
Support the HiveBuzz project. Vote for our proposal!

Hello, is it possible to share the PHP code for your project ? Also, can you tell us more information about the LCD screen, perhaps a link where I can purchase that 4 line LCD screen ?

This post appears awesome, but has left me confused.

tcllib = TCL language

PHP is a separate language that can call TCL but I am unaware of the library which allows interaction with an LCD display. please enlighten me as I have a very similiar display that requires far more code to use the display (but it is not USB, it uses the GPIO pins on the pi)

I entirely code in Tcl, if I can.

thanks

Yes..
The Php part is only used to get the Hive data, and the TCL script is for write to the LCD Screen - the LCD that uses GPIO are less cost..

The LCD that i am using is LCD SMARTIE compatible , that makes that this LCD are not compatible with any other, the TCL script only work with this type of LCD.

some time ago was very popular on ebay, just now is almos impossible to found.
https://www.joom.com/en/products/5c132a718b2c370101b321df

could you share the PHP code used to get the Hive data?

I've not done much with it and would enjoy having my "HIVE POWER" displayed

right on. I see that tcl code is for a smartie-lcd only using USB.

I think I can follow that php, I am no expert in it but have some experience.

thank you.

I will make an library for php for working with Hive, but this will take some time... 🤗

I have written a small tcl class to handle the interactions with hive. Thanks for the inspiration!

i think the voting_power in your code is not accounting for elapsed time. I used voting_manabar last_update_time .. and did my calculations from there.

Here is my post. Hopefully you can figure out how to make it work in php correctly.. here is how it works in TCL.

Thanks again for you help.

This is really nice weldone @condigital 🤝.

Hi, a few hours ago I started a new Witness with my other account , I would be very pleased if you vote for me and support my work... I am going to continue developing software for this blockchain https://ecency.com/hive-167922/@zuun.net/witness - https://vote.hive.uno/@zuun.net -Thank You.!