No.1 For Bitcoin Betting
4 stars based on
30 reviews
The Internet of Things can be used in many applications. For instance, in this project, we are going to use ESP to venture a little bit into the Bitcoin industry. The project we will be looking at will involve getting real-time prices of Bitcoin and displaying the prices on an OLED screen. Any ESP module will do the trick. You also require an OLED screen for display functions. There is a wide array of displays that you can use.
When it comes to the price trend indicator, LEDs are the best bet. So, you will need two LEDs, preferably one red and one green. Other hardware components you will need include a 3. Here is a list of the hardware requirements:. With the hardware requirements out of the way, you can now proceed to the software requirements.
The first thing you need is the latest Arduino IDE. You bitcoin live betting displays download it from the Arduino official website. To get the bitcoin price from the internet you will require some extra help.
Since the ESP cannot access the bitcoin prices directly, you have to use an API that will return the current Bitcoin prices in a suitable format that can be processed by the ESP chip. A good example bitcoin live betting displays the Coindesk API http: The API returns the current bitcoin live betting displays of Bitcoin in different currencies. We will use it in this project to get the price of Bitcoin.
Once that is done, connect the power pins to the OLED screen. Run a jumper wire between the Vin pin of the screen and the 3. Therefore, make sure that your module is configured to use Bitcoin live betting displays. Once you are satisfied with your hardware connections, start configuring your setup.
We will first look at the project code section by section, so that you can understand every bit of it. Its URL is defined in the code like this:.
Several things are done in the setup function of our code. First of all, we initialize the display:. The loop function of the bitcoin live betting displays contains most of the code. First we connect to the API server:. Now we have the answer from the server. The next step is to extract the JSON answer from the raw data we have:. To prevent the sketch from repeating itself every time, we should change the delay between one update and the next:.
Get the complete code in our GitHub repository and change the Wi-Fi name and password in the sketch to match your Wi-Fi networks credentials. Upload the code to the board and open the serial monitor. During the time of testing, the price bitcoin live betting displays This information should also be shown on the OLED screen as shown in the image below: Now that the hardest and most important part of the project is done, we can now proceed to the easier part — adding alert LEDs.
We will add two LEDs to our setup that will indicate the price trend. Flashing the green LED will indicate that the price is going up, while flashing the red one will indicate that the price is going down. Adding the hardware to the project is simple. Your setup should look like this:. Apart from making changes to the hardware, you also need to tweak the code a little.
You also need to define a variable to hold the previous price and the threshold of amount of change we need to flash the LEDs:. In the loop section of the sketch check if it is the first time the code is being run.
If it is, set previousvalue to be equal to the current Bitcoin price:. Check if the price went down by a value more or equal to the threshold. If it did, flash the red LED.
You can now upload the updated project and see it bitcoin live betting displays operation. Either of LEDs should flash quickly depending on the fluctuation in price. In this project, we have managed to do several things: There are many other things that you can do with this project.
For instance, you can tweak the setup to display the price of Bitcoin in more than one currency and add a switch button to change the displayed currency. Therefore, feel free and play around with the project and see what other cool stuff you can make it do.
Simply click on the button below! Components Used in This Tutorial. Here is a list of the hardware requirements: The setup will look like this: Testing the Ticker Once you are satisfied with your hardware connections, start configuring your setup. The first piece of code includes the required library files. Its URL is defined in the code bitcoin live betting displays this: They include the name bitcoin live betting displays password: First of all, we initialize the display: First we connect to the API server: String answer; while client.
The next step is to extract the JSON answer from the raw data we have: You have successfully created your first physical Bitcoin ticker. Your setup should look like this: If it is, set previousvalue to be equal to the current Bitcoin price: How to Go Further In this project, we have managed to do several things: Want to learn more? Get my free eBook about the ESP! TicrThing 2 years ago. Hey, thanks for this post.
We've been working on this concept for 3 years now and made a consumer-friendly version. We call it the TicrThing: For those who like the idea, but don't have the time to build it yourself, you can now get this device at https: Eich 4 months ago. Thanks for this project. I modified it for another OLED, but the main idea is great and it bitcoin live betting displays from the very beginning. Is there any chance to modify for other cryptos like Ethereum?
Tor 3 months ago. I did this on my ESP board. Without the leds of course.