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