2023-07-01 14:16:04 -04:00
2023-07-01 14:16:04 -04:00
2023-07-01 14:16:04 -04:00
2023-05-24 22:27:20 -04:00
2023-07-01 14:16:04 -04:00
2023-02-21 23:15:18 -05:00
2023-07-01 14:16:04 -04:00
2023-07-01 14:16:04 -04:00

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.
    • This is done with JSON-RPC
    • Via the Stratum protocol
    • cJSON seems like a good embedded library for doing this.
  • 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
  • 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: ** Theres 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.)

Description
A bitcoin ASIC miner for the ESP32
Readme GPL-3.0 11 MiB
Languages
C 51.7%
SCSS 30%
TypeScript 11.7%
HTML 4%
Python 1%
Other 1.6%