airc-micro is most tiny AI RC Car project. No camera, no powerful cpu and AI accelerator.
Using simple distance sensor and cheap cpu board such as ESP32, STM32F1xx.
NN is learning on cloud. And deploy to microcontroller by tensorflow lite for microcontroller.
-
Hardware
- Target MCU: ESP32-DevKit
- Controller: USB Game pad
-
Software
- Develop Environment: VisualStudio Code + PlatformIO
- Web browser: Google Chrome(Latest)
-
Cloud
- Cloud Environment: Google coraboratoly
Setup VisualStudio Code in your PC. And then install PlatformIO plugin to VSCode. See in here
Install these libraries by using library manager
Clone this repository and open top directory with VSCode.
- Enable to Agent
Setting remote_agent to config.h AGENT_NAME.
const String AGENT_NAME="remote_agent";
const String BLUETOOTH_SUFFIX="AircMicro";
Then build and flush to Your own car.
- Collect Data
Your car send telemetry data by Bluetooth Serial. Connect to the ESP32 from your laptop. And run below command.
$ python tools/logger.py -p <BluetoothSerial port> -f <Path to save training data>
You can using airccar_micro_tensorflow_keras.ipy nb for training. This notebook train NN with your own dataset. Open notebook with colab. Then upload your traing dataset. And You run all cells. At end of notebook you can download trained model as model of TensorFlow lite for microcontoroller. Further get min_value and max_value for using to normalization.
Replace micro-airc/src/model/airc_model.cpp with the download file. And overwrite min_value and max_value in airc_model.h
Setting nnagent to config.h AGENT_NAME.
const String AGENT_NAME="nnagent";
const String BLUETOOTH_SUFFIX="AircMicro";
Then build and flush to your ESP32.
Now, This is experimental project. If you interest to this project. Please contact me.
If you find bug or want to new functions, please write issue.
If you fix your self, please fork and send pull request.
This software license under MIT licence.
- RumiCar Projects.
- TensorFlow lite for microcontroller
- Arduino_TensorFlowLite_ESP32 by tanakamasayuki