tcc2

Intro

Let’s check the stocks in secret! My precious stocks! I might have a misfortune to lose my job if I get caught by my boss when I check out the stocks during work. Let’s use Arduino to check the stocks! Don’t worry, my boss doesn’t know what it is.

 

STEP 1. <Project or Technology Introduction>

Let’s take the stock price information from the Korea Exchange in XML format, parse them, and check the stock exchange rate with a servomotor by using WIZarduino WiFi.

 

STEP 2. <Materials>

WIZarduino WiFi

1

http://shop.wiznet.co.kr/front/contents/product/view.asp?cateid=&pid=1289

 

MG90S Servomotor

2

http://www.devicemart.co.kr/1313389

 

STEP 3. <Hardware Configuration>

1. Connect Wizarduino and a servomotor. Brown: GND, Red: 5V, Orange: pin 9 (At this time, gender-bender is required since the servomoter connector and Wizarduino connector are equally female.)

3

tcc6

  1. After connecting PC and Wizarduino, click the link below!

https://create.arduino.cc/editor/bangbh/fc59ac13-671d-4073-a593-e3b058248995/preview

Click “ADD to MY SKETCHBOOK” (If you have not joined Arduino or Arduino online IDE, you should join)

  1.   Revise the filled area with xxxxx on 4th, 5th, and 6th line in the ino file. 4th line: router ID, 5th line: router password, 6th line: stock code that you want to check out
    1. Note that the router name and password are a case – sensitive!
    2. How to check out the stock code: the stock code will appear next to the name if you enter Naver Financial and search for the desired stock.4
  2.  Press the arrow button to download the program to the board and select the Monitor menu to check it works properly.(The servo motor moves left and right if uploaded normally.)5
  3. Now you decorate it so the boss can not notice.
    1. Obtain a box to drill the servo motor and the USB hole.
      • tcc5
    2. Put the WIZARDUINO in and fix the servo motor.
      • tcc4
    3. Close the lid and decorate it.
      • tcc2 tcc1

 

STEP 4. <Source Code links and key code descriptions>

The source code is in the Arduino Online IDE and you can add it by clicking on the link below.

https://create.arduino.cc/editor/bangbh/fc59ac13-671d-4073-a593-e3b058248995/preview

6
The most important part of this project is to parse the content after “TBL_StockInfo” among the XML data received via HTTP. Also, it is not easy to convert the price of a stock in to a number, so please refer to that part as well.

 

STEP 5. <Project result>

The stock price is updated once every 5 seconds and the right end shows -30% and the left end shows +30%.

 

Summary

Wizarduino makes it easier to present stock quotes in different ways. It can be displayed in various ways such as LED or servo motor. There are a lot of public data provided by the government in addition to stock quotes. Now the idea becomes a reality.

 

Curator: 방보현

Email: peter@wiznet.io