Skip to content

tes2840/BalanceCar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | Japanese

BalanceCar

If you use BalaceCar, you can make a two-wheeled inverted pendulum robot with M5StickC.
You can maneuver, tune parameters and monitor it over the network with BalanceCarMonitor.

DEMO

Inverted pendulum control demo

BalanceCar_Start  

By using BalanceCarMonitor, you can do the following.

Maneuver demo

You can maneuver BalanceCar with the cross key and also move it diagonally by inputting the cross key at the same time.
demo_operation

Setting demo

You can set the tuning parameters of BalanceCar.
If you want to change the parameters, you can set it with this tool without write the software to M5StickC.

Measurement demo

You can check the status of BalanceCar. This makes it easier to tune parameters of it.

Requirement

Libraries

BalanaceCar requires the following libraries.
https://github.com/m5stack/M5StickC
https://github.com/bblanchon/ArduinoJson

Equipment

BALA-C is required.

Usage

Clone this repository and go into it.

git clone https://github.com/tes2840/BalanceCar
cd BalanceCar

Please configure Config.h to match your network environment.

//Network setting.
const char SSID[] = "";                             // Wi-Fi SSID name.
const char PASSWORD[] = "";                         // Wi-Fi password.
const byte BALAC_IP_ADDR[4] = {192, 168, 11, 101};  // IP Address of BalanceCar.
const byte BALAC_GATEWAY[4] = {192, 168, 11, 1};    // Gateway of BalanceCar.
const byte BALAC_SUBNET[4] = {255, 255, 255, 0};    // Subnetmask of BalanceCar.
const int BALAC_PORT = 50008;                       // Port of BalanceCar.
const byte PC_ADDR[] = {192, 168, 11, 100};         // IP address of the data destination PC.
const int PC_PORT = 50007;                          // Port of the data destination PC.

Build and write to the M5StickC.
Turn on the switch of BALA-C then the LED lights up.
Press and hold Button B while BALA-C is tilted sideways.

Wait until the LED on the M5StickC lights up and "Stand" is displayed on the screen.
BalanceCar_Init

When "Stand" is displayed, keep the BALA-C in the inverted position and wait until the LED lights up again.
When the LED lights up, the inversion control will start.
BalanceCar_Start

Note

I have used the following source code.
https://github.com/m5stack/M5-ProductExampleCodes/tree/master/App/BalaC/Arduino/Balac

Author

github : tes2840
Twitter : @tes2840

License

BalanceCar is under MIT license.

About

Two-wheeled inverted pendulum robot with M5StickC.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published