This is a "fork" of the original Bare-Minimum Hexapod Robot Simulator 2 that is modified to be able to control a real physical hexapod robot, among other things. Note: This uses the hexapod-kinematics-library for computations, replacing previous src/hexapod
.
❗❗🚜 🚧 👷 🏗️ (Underconstruction, use at your own risk! ) ❗❗🚜 🚧 👷 🏗️
v0.2.0
- Replace PubNub with SocketIO. Based on my experiments, PubNub batches messages and isn't "inrealtime" enough. Using SocketIO, the jankiness is significantly reduced.v0.1.0
- Use PubNub to send commands. Janky.
-
Never built a hexapod robot before? The mithi/hexy repository is a great place to start! Includes the BOM!
-
Build your hexapod robot with an Arduino-compatible / Johnny-five compatible board. I personally used an Adafruit Metro Mini 328. Don't forget to flash your board with the recommended standard firmata flavor (see also: Johnny Five Wiki: Getting Started)
-
Update your servo config in
./src/_SERVO_CONFIG.js
. The Johnny Five documentation, Servo API page is your friend! -
I personally use two pwm pins of my board and one PCA9685 to drive my eighteen mg996r servos. If you do the same, make sure you hook it up properly!
-
Inspect and modify the variables in
./src/_VAR_CONFIG.js
as needed. -
This is how the angle of each servo is transformed (function) based on my specific physical hexapod robot configuration. Modify this to suit your needs.
-
This is the bare minimum node script that will talk to your Arduino and the front-end web app / user interface. Modify this to suit your needs.
-
Open two terminal tabs and run the following:
$ npm install
# on one terminal tab, this builds and serves the react app
$ npm run prod:client
# on another terminal tab, this runs the johnny-five script
$ npm run run:server
Enjoy!