Forum Home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    Raspbery Pi based Arcade Machine FTC Payment Proof of concept

    Feathercoin Discussion
    7
    40
    5722
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tmuir12 Regular Member last edited by

      Yes I had great fun adding ‘Compu’er says No’, far more amusing than just ‘Offline’ :)

      1 Reply Last reply Reply Quote 0
      • kris_davison
        kris_davison last edited by

        “Computer says No!” awww mate, that was a brilliant touch, possibly funniest thing this week ^-^

        And Yes Mr Davison, there are some good things to be found today ;)

        Ha ha yes I told you all was not lost!

        1 Reply Last reply Reply Quote 0
        • T
          tmuir12 Regular Member last edited by

          It occurred to me, to make it easier for main stream to what to use cryptos I should possibly make the arcade payment device allow the owner to set a price in their local currency they want a credit to cost rather than in FTC.

          That way if the value of FTC shifts against their local currency they dont have to worru as it will dynamically adjust the price in FTC.

          I think rounding it to the nearest whole FTC would be advisable to keep payment simple though.

          This will radically change the way it all works though as it means it would need to generate the QR codes on the fly as value changes and require a new module to get the price of FTC against the local currency, but I think is acheiveable without too much extra work.

          What does everyone think?

          Is this a worthwhile feature?

          Should I also leave the option to just have a set FTC value too?

          1 Reply Last reply Reply Quote 0
          • T
            tmuir12 Regular Member last edited by

            More progress.

            You now have the option to set the cost per credit in FTC, or in any of the currencies the API supports and on power up it will look at the exchange rate and set the credit price to the nearest whole FTC equal to the value set in Fiat.

            Now comes the fun part to get it to generate the QR code based on the credit price and get it to also display the price in words and the feathercoin logo.

            I know how to make it generate the QR code and to just display that, but will need to learn some python Graphics functions to get the rest togerther.

            1 Reply Last reply Reply Quote 0
            • T
              tmuir12 Regular Member last edited by

              Very Happy

              As stated above you can now set credit cost just as a FTC price, or in any local currency supported by the API and it will round it to the nearest whole FTC, it then creates a QR code based on this price, adds that to a white background on the right, adds the Feathercoin logo on the top left and text detailing the cost per credit in FTC.

              So to change the price per credit all you need to do is alter the text value in the main program.

              I’m debating on whether to add a cheap IR sensor so I can have a screen saver run that when it detects movement will turn back on the display for 2 minutes, but I think tomorrow I will release the coed of what I have done

              1 Reply Last reply Reply Quote 0
              • M
                mirrax last edited by

                Sounds great, everybody still think in fiat anyway.

                This will be success.

                We will continue your story in newsletter #35.

                1 Reply Last reply Reply Quote 0
                • kris_davison
                  kris_davison last edited by

                  Yeah that’s some speedy progress. Love the fiat conversion option.

                  1 Reply Last reply Reply Quote 0
                  • MrWyrm
                    MrWyrm administrators last edited by

                    Following this closely.

                    Like what I do: 6uuy6isbrW1SBF191Bzgui1gWxPdNKx2PB

                    1 Reply Last reply Reply Quote 0
                    • T
                      tmuir12 Regular Member last edited by

                      It’s all up on Github now

                      https://github.com/tmuir12/FTC_Arcade_Pay

                      If you happen to already own the ADAfruit 320 x 240 LCD display for the raspberry pi, please download it, give it a try, try to beak it and give me feedback to improve it.

                      Thanks

                      1 Reply Last reply Reply Quote 0
                      • T
                        tmuir12 Regular Member last edited by

                        Time to start Version 2 of the arcade machine.

                        The main difference with version 2 is it will have the blockchain on the pi itself, so it does not need to rely on an API elsewhere to check if FTC has arrived to give credit.

                        I also plan to add the option to allow discounts for multiple credit purchases at once and I’m sure I’ll come up with other ideas as I progress.

                        Here is a very basic functional description of how it will work.

                        'These are set by the arcade owner in code
                        Cost per credit is set in code either in FTC or local fiat
                        Option to give discount for 3 or more credit is enabled or not in code
                        Percentage discount for 3 or more credits is entered in code
                        Account number to send the received FTC to
                        Balance at which FTC is transferred to other account
                        Pi will be running feathercoind in the background

                        Code basic functional description

                        Get cost in Fiat Per Credit
                        check if discount for multiple credits is given (discount for 3 or more credits)
                        If yes get percentage discount
                        Convert Full price and discount price if used to FTC

                        Check if blockchain is up to date, if not wait until it is

                        Display price per credit and discount for multiple is selected
                        Allow use via touch screen to select how many credits he wants to buy
                        Keep checking wallet is up to date and if it gets more than 4 blocks behind display offline message to caught back up
                        Work out total cost in FTC for selected credits applying discount is more than 3 chosen and discount enabled
                        Create account number
                        Create QR code for account number with total FTC required
                        Display QR code and total in FTC for number of credits
                        Start checking account every 15 seconds to see if deposit has arrived
                        Display option to cancel transaction inbetween checks to go back to main screen to allow credit selection to be done again
                        If correct amount appears in account give credits equal to the amount required
                        If amount is short display how much it is short by and ask difference to be sent
                        If total amount received is less that 3 full priced credits give credits at full price up to amount received
                        If total amount received is more than 3 credits, give credits at discounted price up to amount received
                        Continue to check for difference and credit remaining credits owed when balance is received
                        Continue to give the option to quit back to main screen noting unused balance will be lost
                        Return back to main screen showing cost per credit and discount if used

                        Send balance to another account once balance gets above a predefined level

                        I can reuse some of my code from the first version, but a lot will have to be rewritten

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post