node.js interface for G.C. H/W gamepad emulator.
G.C. H/W gamepad emulator can be controlled from not only GUI programming environment (e.g. Makecode, Node-RED), but also program. This repository contains node.js sample codes.
There are two methods,
- Network access
- Direct access
This method is best for easy-to-use system.
- PC(win/mac/linux)
- G.C. H/W gamepad emulator
- Raspberry Pi (* as G.C. host)
- node.js (>8.0)
- node.js libraries
- node-serialport
- node-red-contrib-game_controllerizer
- websocket (* any other websocket libraries also avairable.)
node-red-contrib-game_controllerizer is the library for Node-RED basically.
But, programmer can call inner functions of the library directly.
Setup G.C. H/W emulator and RasPi kit. See node-red-contrib-game_controllerizer library page. After the Node-RED is running on RasPi, import chearsheet as predefined Node-RED flow.
# clone this repository
% git clone https://github.com/GameControllerizer/GcOpsJs
% cd GcOpsJs
# setup libraries
% npm i serialport
% npm i node-red-contrib-game_controllerizer
% npm i websocket
# run an example code
% node -v
v8.10.0
# !!! Do not forget to configure websocket port & host defined in the example code !!!
% node example_network.jsWhen the program is runnning, the marker of ws:/gamepad node in MISC tab must be green as followed.
This method is best for low latency system.
- PC(win/mac/linux)
- G.C. H/W gamepad emulator
- USB serial interface (e.g. FT23x)
- UBS cables
same as 'Network access'
# clone this repository
% git clone https://github.com/GameControllerizer/GcOpsJs
% cd GcOpsJs
# setup libraries
% npm i serialport
% npm i node-red-contrib-game_controllerizer
# run an example code
% node -v
v8.10.0
# !!! Do not forget to configure serialport name defined in the example code !!!
% node example_direct.jsAll the programmer have to do is call GcOps.toBytes() function to
convert JSON based command list into bytes.
Check DSL4GC for command format.




