DIY A Stock Tracking Device
DIY A Stock Tracking Device
0
Components
Hardware componentsSeeed Squama Ethernet - Arduino W5500 Ethernet Board with PoE
x 1
Seeed I2C_LCD
x 1
Project description
Story
I will make some secondary market investments in my spare time. Usually these tasks can be done only in the mobile app. But I think it is also very interesting to use a hardware device to check stock information, so I made this project, hope you like it.
Features of the project
View real-time information of individual stocks, including,
- Real-time stock price
- Ups and downs
- Holding cost Number of shares
View the overall position information, including,
- Total assets
- Total profit and loss
- Profit and loss of the day
- Total yield
Hardware connection
The hardware setup is very easy, you only need to connect the I2C_LCD to the I2C interface on the Squama Ethernet, and connect the Suqama RJ45 interface to the router. If your router supports PoE, you don’t need to supply power via USB after the code is burned.
Software
This project uses Arduino for development. Before starting, you need to read?wiki for Squama Ethernet?and make some configuration.
The code for this project has been put on Github, you can download it?here.
Open the demo code, you need to change something, as below:
#define NUM_STOCK 4 // How many stocks do you have
char stockCode[NUM_STOCK][20] = {"tsla", "gme", "ccl", "aapl"}; // stock code
int stockNum[NUM_STOCK] = {100, 200, 5000, 2000}; // how many do you have
float stockCost[NUM_STOCK] = {512.1, 20.5, 13.5, 76.3}; // holding cose
char stockName[NUM_STOCK][20] = {"TESLA", "GME", "CCL", "APPLE"}; // name
This code at Line 15~20.
You need to modify the above information and upload the code to Squama Ethernet, then it works.
Have fun.