Ashwini kumar sinha
Published

Smart Real-Time Stock Market and Website Traffic Monitoring

We are going to build a smart screen that displays live data of the stock market, website traffic, or even a company's profit.

IntermediateShowcase (no instructions)10 hours595
Smart Real-Time Stock Market and Website Traffic Monitoring

Things used in this project

Hardware components

Spresense boards (main & extension)
Sony Spresense boards (main & extension)
×1
1.8 inch ST7735R SPI 128*160 TFT LCD Display Module
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

untitled_G3WQGWxKQV.png

Code

Python ral time data

Python
import time
import sys

s = serial.Serial('COM8')
serial.baudrate = 9600
res = s.read()
from rtstock.stock import Stock
stock = Stock('AAPL')
stock.get_latest_price()
{
    'LastTradePriceOnly': '95.89',
    'LastTradeTime': '4:00pm'
}
text = stock.get_latest_price()
print (text)
while True:
    s.write(text.encode)

Soney real time data display

Arduino
#define SPI_HAS_TRANSACTION
#define USE_HW_SPI

#include <arch/board/board.h>


#include <TFT.h>  
#include <SPI.h>
#define cs PIN_D10
#define dc PIN_D09
#define rst PIN_D08

TFT TFTscreen = TFT(cs, dc, rst);

char displaytext[200];
void setup() {
   Serial.begin(9600);
  
  TFTscreen.begin();

 
  TFTscreen.background(0, 0, 0);

 
  TFTscreen.stroke(255, 255, 255);
  
  TFTscreen.setTextSize(2);
 
  TFTscreen.text("Stock market live data\n ", 0, 0);
  
  TFTscreen.setTextSize(5);
}




void loop() {

  // Read the value of the sensor on A0
  String text = Serial.read()


  text.toCharArray(displaytext, 4);


  TFTscreen.stroke(255, 255, 255);

  TFTscreen.text(displaytext, 0, 20);
 
  delay(250);

  TFTscreen.stroke(0, 0, 0);
  TFTscreen.text(displaytext, 0, 20);
}

Credits

Ashwini kumar sinha

Ashwini kumar sinha

31 projects • 75 followers
Ashwini kumar sinha a Robotic lover and electronics hobbyist. Works at EFY-I

Comments