8000 GitHub - YGFYHD2018/3d_led_cube_go
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Notifications You must be signed in to change notification settings

YGFYHD2018/3d_led_cube_go

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to Setup Develop Environment

1. Install Golang

Recomended go version: 1.11

Install Instruction for linux(raspbian)

wget https://storage.googleapis.com/golang/go1.11.1.linux-armv6l.tar.gz 
sudo tar -C /usr/local -xzf go1.11.1.linux-armv6l.tar.gz

add a below to end of ~/.bash_profile

export PATH=$PATH:/usr/local/go/bin

Referenced from: https://golang.org/doc/install

2. Setup Environment Variable

add belows to end of ~/.bash_profile

....
export "GOPATH=$HOME/go"
export "PATH=$PATH:$GOPATH/bin"

then, apply these settings.

source ~/.bash_profile

3. Run "go get"s

go get gonum.org/v1/gonum/mat
go get github.com/jessevdk/go-assets-builder
go get github.com/stretchr/testify

4. Clone The Code

Get the code

mkdir -p $GOPATH/src
cd $GOPATH/src
git clone https://github.com/YGFYHD2018/3d_led_cube_go.git
cd 3d_led_cube_go

5. Build And Run The Program

go run main.go

or if you want executable file.

go build
./3d_led_cube_go

This command starts LedFramework whitch can receive "JSON Orders To Show Content" by HTTP(port 8081).
The target to send "Raw Order To Show Content" by UDP is set "localhost:9001" by default.
It can be changed by run with "-d" option.

Ex.

go run main.go -d 192.168.0.xx:9001

or

go build
./3d_led_cube_go -d 192.168.0.xx:9001

6. (Optional) Setup Realsense Reciver

install and go get zeromq

sudo apt-get update
sudo apt-get install -y \
    git build-essential libtool \
    pkg-config autotools-dev autoconf automake cmake \
    uuid-dev libpcre3-dev libsodium-dev valgrind
# only execute this next line if interested in updating the man pages as well (adds to build time):
sudo apt-get install -y asciidoc

git clone git://github.com/zeromq/libzmq.git
cd libzmq
./autogen.sh
# do not specify "--with-libsodium" if you prefer to use internal tweetnacl security implementation (recommended for development)
./configure --with-libsodium
make check
sudo make install
sudo ldconfig
cd ..

git clone git://github.com/zeromq/czmq.git
cd czmq
./autogen.sh && ./configure && make check
sudo make install
sudo ldconfig
cd ..
go get github.com/zeromq/goczmq

run or build with '-tags=realsense' option witch enable to receive image data from realsense module.

Ex.

go run main.go -tags=realsense -d 192.168.0.xx:9001

or

go build -tags=realsense
./3d_led_cube_go -d 192.168.0.xx:9001

Install instruction of czmq is referenced form https://github.com/zeromq/czmq#building-and-installing

Others

If you add file(s) to under "/asset" ...

You have to run 'build_assets.sh' to generate code that implement go code and binary assets into one binary.
Please see the detail https://github.com/jessevdk/go-assets-builder

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.9%
  • Shell 0.1%
0