Menu
Index
Engineering
Entertainment
Literature
Miscellaneous
Contact
Search
tiktok.com/@pkvi.xyz
scored.co/u/pkvi_mv
Why Ayh?
Miter
Miter
@pkvi
"...may not meet professional standards."
1767 miters
123 tenons
Subscribe
0.00307
Arduino Bluetooth Computer Wake


Arduino Nano
HC-06 Bluetooth Module
5V Relay Module
Button Module
5V Regulator Transistor
(2) 10uf Capacitor
Red LED
Blue LED
(2) 220 ohm Resistor
Female Barrel Plug
Male Barrel Plug
BIOS > Boot Options > Power On When AC Detected


  1. // Bluetooth Computer Wake
  2. // pkvi
  3. int red = 3;
  4. int blue = 5;
  5. int relay = 7;
  6. int button = 9;
  7. int state = 0;
  8. void setup() {
  9. Serial.begin(9600);
  10. pinMode(red, OUTPUT);
  11. pinMode(blue, OUTPUT);
  12. pinMode(relay, OUTPUT);
  13. pinMode(button, INPUT);
  14. }
  15. void loop() {
  16. if (Serial.available())
  17. {
  18. char data;
  19. data = Serial.read();
  20. if (data == '1') {
  21. turn_on();
  22. }
  23. }
  24. state = digitalRead(button);
  25. if (state == LOW) {
  26. turn_on();
  27. }
  28. digitalWrite(blue, HIGH);
  29. digitalWrite(red, LOW);
  30. digitalWrite(relay, LOW);
  31. delay(5);
  32. }
  33. void turn_on() {
  34. digitalWrite(blue, LOW);
  35. digitalWrite(red, HIGH);
  36. digitalWrite(relay, HIGH);
  37. delay(2000);
  38. digitalWrite(relay, LOW);
  39. }