- Install a web server on your Raspberry Pi;
- Save the 1.php and 2.php files in the localhost root folder;
- Open your web browser and go to "http: //localhost/1.php"
- Make a BTC transaction for the address you placed in the 1.php code;
- As soon as the transaction occurs, Blockchain.info's WebSocket API will warn you of your 1.php file
- The javascript code that is in 1.php will open the 2.php file
- The simple fact of the 2.php file being executed (http: //localhost/2.php) will make the engine run
The end!
Links:Instruções em portugues: https://medium.com/@ricardoreis_22930/máquina-de-café-que-aceita-bitcoin-b2d031592893
By: Cabe Atwell
Remember when Bitcoin was on the rise? It was controversial and also widely misunderstood. It seems the cryptocurrency has waned in the last few years, but some are still turning to it to create new uses for it. Brazilian entrepreneur Ricardo Reis recently devised a Bitcoin-powered coffee machine to show how cryptocurrency can be used as actual programmable money.
Reis posted a video demonstrating how the coffee machine works and it went viral shortly after. So, how does it work? The coffee machine is activated after a specific amount of Bitcoin gets deposited to the machine’s wallet. The machine has a QR code that lets users send over funds and pay for the coffee. All it needs to work is an internet connection while customers need a Bitcoin wallet.
In an interview with Brazilian news outlet Portal do Bitcoin, Reis revealed how he got the setup to work. He used a Raspberry Pi to power the coffee machine programmed using the PHP programing language. The machine doesn’t use Bitcoin’s Lightning Network (LN), but Reis wants to create one use the network soon. He currently has a website where you can pay for mock coffee and other products to let him test the LN.
Although Reis developed this device, he admits he’s not fully involved with the cryptocurrency market. Rather, he considers himself a Bitcoin enthusiast that uses “the flagship cryptocurrency as an investment since 2016.” He doesn’t have any plans to take his creation to the masses. Instead, he used it as an opportunity to learn more about the technology itself.
Reis’ machine comes at a good time for cryptocurrency. The market is bouncing back after the U.S. SEC declared that it doesn’t consider Ethereum a security. Recently, the market saw a steep decline where the value of Bitcoin dropped from nearly $20, 000 in December to $6, 500. According to Fundstrat founder Tom Lee, the prices started to decline due to futures expiration dates. He noted how the prices changed dramatically around CBOE future expirations. Others believe the decline is a response to suspicious market activity during last year’s Bull Run. With new developments, it seems like the market is slowly, but steadily, recovering.
Comments