- At first, the miner will (attempt to) automatically install required dependencies via pip. If it fails, you'll need to do it manually using the command it will provide.
+ At first, the miner will (attempt to) automatically install required dependencies via pip. If it fails, you'll need to do it manually using the command it will show.
+ In the newest Python versions it may be impossible to install dependencies due to PIP's policy. To restore the bevahior from previous versions, use these commands:
+ mkdir ~/.config
, then mkdir ~/.config/pip
and finally
+ echo -e "[global]\nbreak-system-packages=true" > ~/.config/pip/pip.conf
+ After executing these commands, launch the Miner again.
+
From this point the PC Miner should tell you all you need to know. Answer the questions to complete the configuration phase - miner will remember the settings for the future.
@@ -2424,18 +2452,18 @@
To download the latest source you can use the following command:
- wget https://github.com/revoxhere/duino-coin/archive/refs/tags/3.3.zip
+ wget https://github.com/revoxhere/duino-coin/archive/refs/tags/4.0.zip
4
After downloading you need to extract the .zip file. You can do this by opening it and moving the contents to your desktop or typing the following command:
- unzip 3.3.zip
+ unzip 4.0.zip
5
Navigate into the folder you extracted the release to with
- cd duino-coin-3.3
and Launch the PC_Miner.py by typing
+ cd duino-coin-4.0
and Launch the PC_Miner.py by typing
python PC_Miner.py
into your terminal.
@@ -2444,7 +2472,7 @@
- If you want to reset the configuration in the future, simply delete the Settings.cfg file inside the Duino-Coin PC Miner 3.3 folder.
+ If you want to reset the configuration in the future, simply delete the Settings.cfg file inside the Duino-Coin PC Miner 4.0 folder.
@@ -2988,11 +3016,10 @@
path: 'assets/animations/particle_bg.json'
});*/
-let latest_release = "3.33";
+let latest_release = "4.03";
$.getJSON('https://api.github.com/repos/revoxhere/duino-coin/releases',
function(data) {
latest_release = data[0]["tag_name"];
- console.log(latest_release);
$(".release_ver").text(latest_release);
@@ -3041,47 +3068,81 @@
rig_id = $("#esp32_name").val();
enable_dash = $('#esp32_dashboard').is(':checked');
enable_led = $('#esp32_led').is(':checked');
- enable_ota = $('#esp32_ota').is(':checked');
+ enable_sensor = $('#esp32_sensor').is(':checked');
if (!miner_pass) miner_pass = "None";
if (!wifi_password) wifi_password = "";
+
if (!username || !wifi_name) {
alert("Fill in the blanks first!");
return;
}
$("#esp32_download_button").addClass("is-loading");
- $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP32_Code/ESP32_Code.ino',
+
+ var zip = new JSZip();
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/Settings.h',
function(data, textStatus, jqXHR) {
- ESP32_CODE = data;
+ SETTINGS_CODE = data;
if (rig_id) {
- ESP32_CODE = ESP32_CODE.replace(
- `const char *RIG_IDENTIFIER = "None";`,
- `const char *RIG_IDENTIFIER = "${rig_id}";`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(
+ `extern const char RIG_IDENTIFIER[] = "None";`,
+ `extern const char RIG_IDENTIFIER[] = "${rig_id}";`);
}
if (!enable_led) {
- ESP32_CODE = ESP32_CODE.replace(
- `const bool LED_BLINKING = true;`,
- `const bool LED_BLINKING = false;`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(
+ `#define LED_BLINKING`,
+ `// #define LED_BLINKING`);
}
if (enable_dash) {
- ESP32_CODE = ESP32_CODE.replace(
+ SETTINGS_CODE = SETTINGS_CODE.replace(
`// #define WEB_DASHBOARD`,
`#define WEB_DASHBOARD`);
}
- if (enable_ota) {
- ESP32_CODE = ESP32_CODE.replace(
- `// #define ENABLE_OTA`,
- `#define ENABLE_OTA`);
+ if (enable_sensor) {
+ SETTINGS_CODE = SETTINGS_CODE.replace(
+ `// #define USE_INTERNAL_SENSOR`,
+ `#define USE_INTERNAL_SENSOR`);
}
- ESP32_CODE = ESP32_CODE.replace(`"USERNAME"`, `"${username}"`);
- ESP32_CODE = ESP32_CODE.replace(`"MINING_KEY"`, `"${miner_pass}"`);
- ESP32_CODE = ESP32_CODE.replace(`"WIFI_NAME"`, `"${wifi_name}"`);
- ESP32_CODE = ESP32_CODE.replace(`"WIFI_PASSWORD"`, `"${wifi_password}"`);
- save(ESP32_CODE, `ESP32_Code_v${latest_release}-${username}.ino`)
- $("#esp32_download_button").removeClass("is-loading");
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"my_cool_username"`, `"${username}"`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"mySecretPass"`, `"${miner_pass}"`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"SSID"`, `"${wifi_name}"`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"PASSW0RD"`, `"${wifi_password}"`);
+ zip.file("ESP_Code/Settings.h", SETTINGS_CODE);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/MiningJob.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/MiningJob.h", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/ESP_Code.ino',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/ESP_Code.ino", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/Dashboard.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/Dashboard.h", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/DSHA1.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/DSHA1.h", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/Counter.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/Counter.h", data);
+
+ zip.generateAsync({type:"blob"}).then(function(content) {
+ save(content, `ESP_Code-${username}.zip`);
+ });
+
+ $("#esp32_download_button").removeClass("is-loading");
+ });
+ });
+ });
+ });
+ });
});
}
@@ -3094,47 +3155,74 @@
rig_id = $("#esp8266_name").val();
enable_dash = $('#esp8266_dashboard').is(':checked');
enable_led = $('#esp8266_led').is(':checked');
- enable_overclock = $('#esp8266_oc').is(':checked');
if (!miner_pass) miner_pass = "None";
if (!wifi_password) wifi_password = "";
+
if (!username || !wifi_name) {
alert("Fill in the blanks first!");
return;
}
$("#esp8266_download_button").addClass("is-loading");
- $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP8266_Code/ESP8266_Code.ino',
+ var zip = new JSZip();
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/Settings.h',
function(data, textStatus, jqXHR) {
- ESP8266_CODE = data;
+ SETTINGS_CODE = data;
if (rig_id) {
- ESP8266_CODE = ESP8266_CODE.replace(
- `const char *RIG_IDENTIFIER = "None";`,
- `const char *RIG_IDENTIFIER = "${rig_id}";`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(
+ `extern const char RIG_IDENTIFIER[] = "None";`,
+ `extern const char RIG_IDENTIFIER[] = "${rig_id}";`);
}
if (!enable_led) {
- ESP8266_CODE = ESP8266_CODE.replace(
- `const bool LED_BLINKING = true;`,
- `const bool LED_BLINKING = false;`);
- }
- if (!enable_overclock) {
- ESP8266_CODE = ESP8266_CODE.replace(
- `const bool USE_HIGHER_DIFF = true;`,
- `const bool USE_HIGHER_DIFF = false;`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(
+ `#define LED_BLINKING`,
+ `// #define LED_BLINKING`);
}
if (enable_dash) {
- ESP8266_CODE = ESP8266_CODE.replace(
- `const bool WEB_DASHBOARD = false;`,
- `const bool WEB_DASHBOARD = true;`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(
+ `// #define WEB_DASHBOARD`,
+ `#define WEB_DASHBOARD`);
}
- ESP8266_CODE = ESP8266_CODE.replace(`"USERNAME"`, `"${username}"`);
- ESP8266_CODE = ESP8266_CODE.replace(`"MINING_KEY"`, `"${miner_pass}"`);
- ESP8266_CODE = ESP8266_CODE.replace(`"WIFI_NAME"`, `"${wifi_name}"`);
- ESP8266_CODE = ESP8266_CODE.replace(`"WIFI_PASSWORD"`, `"${wifi_password}"`);
- save(ESP8266_CODE, `ESP8266_Code_v${latest_release}-${username}.ino`)
- $("#esp8266_download_button").removeClass("is-loading");
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"my_cool_username"`, `"${username}"`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"mySecretPass"`, `"${miner_pass}"`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"SSID"`, `"${wifi_name}"`);
+ SETTINGS_CODE = SETTINGS_CODE.replace(`"PASSW0RD"`, `"${wifi_password}"`);
+ zip.file("ESP_Code/Settings.h", SETTINGS_CODE);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/MiningJob.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/MiningJob.h", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/ESP_Code.ino',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/ESP_Code.ino", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/Dashboard.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/Dashboard.h", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/DSHA1.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/DSHA1.h", data);
+
+ $.get('https://raw.githubusercontent.com/revoxhere/duino-coin/master/ESP_Code/Counter.h',
+ function(data, textStatus, jqXHR) {
+ zip.file("ESP_Code/Counter.h", data);
+
+ zip.generateAsync({type:"blob"}).then(function(content) {
+ save(content, `ESP_Code-${username}.zip`);
+ });
+
+ $("#esp8266_download_button").removeClass("is-loading");
+ });
+ });
+ });
+ });
+ });
});
}