Giter Club home page Giter Club logo

ethereum-gas-station-project's Introduction

GasStation Project

사용방법

프로젝트 내의 디렉토리는 라즈베리파이, 아두이노 내에 모두 위치시킨다.

Desktop 및 라즈베리파이 환경 설정

  1. 2개의 geth를 활용하여 프라이빗 블록체인을 구축한다.
  2. 라즈베리파이의 geth를 해당 프라이빗 블록체인에 참여시켜 총 3개의 노드로 구성된 블록체인을 구축한다.
  3. contract 디렉토리 내에 있는 GasCheck.sol 를 컨트랙트로 배포한다.
  4. 라즈베리 파이 내에 public 디렉토리 및 app.js, package.json 을 위치시키고 npm install 을 진행하여 모듈들을 다운로드 받는다.
  5. 라즈베리파이 내의 app.js 소스코드의 내용 중 컨트랙트 정보 (contract address, contract abi)를 배포한 컨트랙트의 내용에 맞게 업데이트 시켜준다.
  6. 라즈베리파이 내의 public 디렉토리 내의 GasStationEvent.html 의 내용 또한 배포한 컨트랙트에 맞게 업데이트 시켜준다.

아두이노와 라즈베리파이 환경 설정

  1. 아두이노와 라즈베리 파이는 유선으로 연결한다.
  2. 아두이노에 수위 센서 회로 구성을 마치고 IoT 디렉토리 내의 코드를 동작시킨다.
  3. 라즈베리 파이에서는 이에 맞춰 app.js 파일을 node app.js 명령으로 실행시킨다.
  4. 실행하면 포트 넘버가 결과로 출력되는데, 이때 public 폴더 내의 index.html 을 확인하기 위해 localhost:<port_number> 를 입력하여 웹 브라우저로 띄운다.
  5. 마지막으로 public 디렉토리 내의 GasStationEvent.html 을 웹브라우저에 띄우도록 한다.

ethereum-gas-station-project's People

Contributors

dlgusdn616 avatar wisecow2 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.