Project to test a setup for ESP32 S3 N16R8 as a bitcoin solo miner or ticket miner.
IDE: VSCode, using the ESP-IDF: Explorer extension.
Hardware: ESP32-S3-N16R8 (via ESP-PROG)
This is a learning project focused on:
- Learning C and Assembly programming
- Developing low-level, hardware-effective code
- Ensuring safety, privacy, and modularity
- Building an ESP32 Bitcoin miner from scratch
New to ESP32 Bitcoin mining? Start here:
- Quick Start Guide - Get mining in 5 minutes
- Comprehensive Mining Strategies - Deep dive into mining approaches, hardware optimization, and cooling requirements
These guides cover:
- Multiple mining approaches (NerdMiner, NMMiner, LeafMiner)
- Hardware specifications and cooling requirements
- Performance benchmarks and expectations
- Thermal management and active cooling recommendations
- Optimization techniques and troubleshooting
For a complete guide to all documentation in this repository, see Documentation Structure.
To configure your WiFi credentials for local development:
-
Copy the example configuration file:
cp main/config.h.example main/config.h
-
Edit
main/config.hand update the WiFi credentials:#define WIFI_SSID "your_wifi_ssid" #define WIFI_PASS "your_wifi_password"
-
The
config.hfile is gitignored to prevent accidentally committing your credentials.
Note: Never commit your main/config.h file with real credentials to version control.
CI/CD builds automatically skip WiFi functionality since config.h is not committed to the repository for security reasons. The WiFi code is conditionally compiled only when WIFI_SSID is defined (which comes from your local config.h file created from config.h.example). This allows automated builds to succeed without requiring WiFi credentials.
- Install ESP-IDF v5.1.2 or later
- Set up your WiFi configuration (see above)
- Build the project:
idf.py set-target esp32s3 idf.py build
- Flash to your ESP32-S3:
idf.py flash monitor
This project includes unit tests for core functionality using the ESP-IDF Unity test framework.
The test suite is located in the test/ directory. To build and run tests:
# Build the test application
idf.py set-target esp32s3
idf.py build
# Flash and monitor (if you have hardware)
idf.py flash monitorWe use an automated feature detector to ensure all public functions have unit tests. To check test coverage:
python3 scripts/detect_features.py .This script will:
- Analyze all C source files in the
main/directory - Identify functions that lack unit tests
- Generate test stubs for missing tests
When adding new functions:
- Write the function in the appropriate source file
- Add corresponding test functions in the
test/directory - Run the feature detector to verify coverage
- Test names should follow the pattern:
test_<function_name>
Example test structure:
void test_my_function(void)
{
// 1. Setup test data
// 2. Call the function
// 3. Assert expected results
TEST_ASSERT_EQUAL(expected, actual);
}If you need to identify the correct I2C pins on your ESP32 board, use the GPIO_Pin_Test tool located in the GPIO_Pin_Test/ directory. This standalone project helps you:
- Find working SDA/SCL pin pairs
- Scan for I2C device addresses
- Test specific pin configurations
See GPIO_Pin_Test/README.md for detailed instructions.
This project uses GitHub Actions for continuous integration. See CI_CD_SETUP.md for details.
All pull requests must pass:
- ✅ Build verification
- 🔍 Static code analysis
- 🔒 Security scanning
- 📝 Code quality checks
- 🧪 Test coverage verification
See our pull request template and issue templates for contribution guidelines.
This is a learning project. Feel free to use and modify for educational purposes.