RC Submarine 5.0 – code (8/10) 0 ▲ Brick Experiment Channel 3 hours ago · 57 min read11376 words · Tech · hide · 0 comments Next, we need to implement the software for the rc submarine. The code has many tasks: -parse PPM radio signal -drive the motors via PWM signals -read depth from the pressure sensor -read the pitch angle from the IMU sensor -run PID controllers for depth and pitch -write data logs Computer The code will run on the Arduino Nano ESP32 microcontroller, which has a dual-core 240 MHz processor, 512 KB of RAM and 16 MB of flash. Performance-wise there shouldn’t be any problems running the code. One shortcoming is the storage capacity. There is only 9.3 MB of free flash available for data logs, which isn’t much. We will have to reduce the sampling rate and the amount of log data. Development environment For development, I’ve used the Arduino IDE. You can download it from their website and follow the instructions. After installation, you first need to download a library. I’ve chosen perhaps the most common library recommended everywhere, an old but stable release: Arduino ESP32 Boards,… No comments yet. Log in to reply on the Fediverse. Comments will appear here.