feat: Initialized Repository
This commit is contained in:
commit
cb2eb9dee3
42
Arduino/Blink/Blink.ino
Executable file
42
Arduino/Blink/Blink.ino
Executable file
@ -0,0 +1,42 @@
|
||||
const int ledPin = 4; // Define the LED pin
|
||||
const int minOnTime = 100; // Minimum time LED is ON in milliseconds
|
||||
const int maxOnTime = 3000; // Maximum time LED is ON in milliseconds
|
||||
const int minOffTime = 50; // Minimum time LED is OFF in milliseconds
|
||||
const int maxOffTime = 200; // Maximum time LED is OFF in milliseconds
|
||||
|
||||
unsigned long previousMillis = 0;
|
||||
int ledState = LOW;
|
||||
unsigned long onTime = 0;
|
||||
unsigned long offTime = 0;
|
||||
|
||||
void setup() {
|
||||
pinMode(ledPin, OUTPUT);
|
||||
generateRandomTimes();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
unsigned long currentMillis = millis();
|
||||
|
||||
if (ledState == LOW) {
|
||||
if (currentMillis - previousMillis >= offTime) {
|
||||
// Turn the LED on
|
||||
ledState = HIGH;
|
||||
previousMillis = currentMillis;
|
||||
generateRandomTimes();
|
||||
}
|
||||
} else {
|
||||
if (currentMillis - previousMillis >= onTime) {
|
||||
// Turn the LED off
|
||||
ledState = LOW;
|
||||
previousMillis = currentMillis;
|
||||
generateRandomTimes();
|
||||
}
|
||||
}
|
||||
|
||||
digitalWrite(ledPin, ledState);
|
||||
}
|
||||
|
||||
void generateRandomTimes() {
|
||||
onTime = random(minOnTime, maxOnTime + 1); // Generate a random ON time
|
||||
offTime = random(minOffTime, maxOffTime + 1); // Generate a random OFF time
|
||||
}
|
1
Arduino/Blink/Blink.txt
Executable file
1
Arduino/Blink/Blink.txt
Executable file
@ -0,0 +1 @@
|
||||
Turn an LED on and off.
|
57
Arduino/LEDTest/LEDTest.ino
Normal file
57
Arduino/LEDTest/LEDTest.ino
Normal file
@ -0,0 +1,57 @@
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
|
||||
const int redPin = 4;
|
||||
const int greenPin = 5;
|
||||
const int bluePin = 13;
|
||||
const int whitePin = 14;
|
||||
|
||||
#define PIN_WS2812B 27
|
||||
#define NUM_PIXELS 182
|
||||
|
||||
Adafruit_NeoPixel ws2812b(NUM_PIXELS, PIN_WS2812B, NEO_GRB + NEO_KHZ800);
|
||||
|
||||
void setup() {
|
||||
ws2812b.begin();
|
||||
|
||||
pinMode(redPin, OUTPUT);
|
||||
pinMode(greenPin, OUTPUT);
|
||||
pinMode(bluePin, OUTPUT);
|
||||
pinMode(whitePin, OUTPUT);
|
||||
|
||||
analogWrite(redPin, 0);
|
||||
analogWrite(greenPin, 0);
|
||||
analogWrite(bluePin, 0);
|
||||
analogWrite(whitePin, 0);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
ws2812b.clear();
|
||||
|
||||
for (int pixel = 0; pixel < NUM_PIXELS; pixel++) { // for each pixel
|
||||
ws2812b.setPixelColor(pixel, ws2812b.Color(125, 249, 255)); // it only takes effect if pixels.show() is called
|
||||
ws2812b.show(); // update to the WS2812B Led Strip
|
||||
|
||||
delay(25); // 500ms pause between each pixel
|
||||
}
|
||||
|
||||
analogWrite(redPin, 0);
|
||||
analogWrite(greenPin, 0);
|
||||
analogWrite(bluePin, 0);
|
||||
analogWrite(whitePin, 0);
|
||||
analogWrite(redPin, 255);
|
||||
delay(1000);
|
||||
analogWrite(redPin, 0);
|
||||
analogWrite(greenPin, 255);
|
||||
delay(1000);
|
||||
analogWrite(greenPin, 0);
|
||||
analogWrite(bluePin, 255);
|
||||
delay(1000);
|
||||
analogWrite(bluePin, 0);
|
||||
analogWrite(whitePin, 255);
|
||||
delay(1000);
|
||||
analogWrite(redPin, 125);
|
||||
analogWrite(greenPin, 249);
|
||||
analogWrite(bluePin, 255);
|
||||
delay(2000);
|
||||
|
||||
}
|
6
Arduino/Program/Program.ino
Normal file
6
Arduino/Program/Program.ino
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
void setup() {
|
||||
}
|
||||
|
||||
void loop() {
|
||||
}
|
2
Arduino/Program/sketch.yaml
Normal file
2
Arduino/Program/sketch.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
default_port: /dev/ttyUSB0
|
||||
default_fqbn: esp32:esp32:nodemcu-32s
|
BIN
Audio/2023-09-18 15-12-10.aup3
Normal file
BIN
Audio/2023-09-18 15-12-10.aup3
Normal file
Binary file not shown.
BIN
Audio/2023-09-18 15-12-10.mp3
Normal file
BIN
Audio/2023-09-18 15-12-10.mp3
Normal file
Binary file not shown.
BIN
Audio/2023-09-18 15-12-10.wav
Normal file
BIN
Audio/2023-09-18 15-12-10.wav
Normal file
Binary file not shown.
BIN
Audio/electrified-granules-v3-70951.mp3
Normal file
BIN
Audio/electrified-granules-v3-70951.mp3
Normal file
Binary file not shown.
BIN
Audio/power-charge-6798.mp3
Normal file
BIN
Audio/power-charge-6798.mp3
Normal file
Binary file not shown.
BIN
Audio/sci-fi-weapon-charging-01-96645.mp3
Normal file
BIN
Audio/sci-fi-weapon-charging-01-96645.mp3
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user