ESP-Miner
ESP-Miner is bitcoin miner software designed to run on the ESP32. It mines on ASICs such as the Bitmain BM1397. The Bitaxe is a handy board for this!
Overview
- ESP-Miner connects to your pool or stratum server and subscribes to get the latest work.
- ESP-Miner gets the latest work and formats it to be sent to the mining ASIC.
- There isn't much change here except for computing the midstates, and shifting some bytes around
- Beware of endianess!
- How do we do this? Examples in cgminer Kano edition.
- I have started on this.. check this
- There isn't much change here except for computing the midstates, and shifting some bytes around
- ESP-Miner sends this work to the mining ASIC over serial.
Hardware Required
To run this example, you should have one ESP32, ESP32-S or ESP32-C based development board as well as a MPU9250. MPU9250 is a inertial measurement unit, which contains a accelerometer, gyroscope as well as a magnetometer, for more information about it, you can read the PDF of this sensor.
Pin Assignment:
Note: The following pin assignments are used by default, you can change these in the menuconfig
.
SDA | SCL | |
---|---|---|
ESP I2C Master | I2C_MASTER_SDA | I2C_MASTER_SCL |
MPU9250 Sensor | SDA | SCL |
For the actual default value of I2C_MASTER_SDA
and I2C_MASTER_SCL
see Example Configuration
in menuconfig
.
**Note: ** There’s no need to add an external pull-up resistors for SDA/SCL pin, because the driver will enable the internal pull-up resistors.
Build and Flash
Enter idf.py -p PORT flash monitor
to build, flash and monitor the project.
(To exit the serial monitor, type Ctrl-]
.)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
Example Output
I (328) i2c-simple-example: I2C initialized successfully
I (338) i2c-simple-example: WHO_AM_I = 71
I (338) i2c-simple-example: I2C unitialized successfully
Troubleshooting
(For any technical queries, please open an issue on GitHub. We will get back to you as soon as possible.)