This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"start:server": "CHOKIDAR_USEPOLLING=true nodemon index.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pins_arduino.h> | |
#include "AiEsp32RotaryEncoder.h" | |
#define KY040_SW D3 | |
#define KY040_CLK D4 | |
#define KY040_DT D5 | |
#define KY040_VCC -1 // -1 if rotary encoder is connected directly to 3.3V | |
#define KY040_STEPS 4 //depending on your encoder - try 1,2 or 4 to get expected behaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_SSD1306.h> | |
#include <Adafruit_GFX.h> | |
#include <pins_arduino.h> | |
#define SCREEN_WIDTH 128 // OLED display width, in pixels | |
#define SCREEN_HEIGHT 32 // OLED display height, in pixels | |
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin) | |
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32 | |
#define OLED_SDA D6 | |
#define OLED_SCL D7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (let a = 0; a < angles.length; a++) { | |
let angle; | |
const strokeColor = 'rgba(255, 255, 255, 0.6)'; | |
if (a === angles.length - 1) { | |
angle = (angles[0] + 360 - angles[a]) / 2 + angles[a]; | |
} else { | |
angle = (angles[a + 1] - angles[a]) / 2 + angles[a]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void downloadFile(string sourceURL, string destinationPath) | |
{ | |
long fileSize = 0; | |
int bufferSize = 1024; | |
bufferSize *= 1000; | |
long existLen = 0; | |
System.IO.FileStream saveFileStream; | |
if (System.IO.File.Exists(destinationPath)) | |
{ |