Flashing Light Prize (6) Arduino 101 Break Up FAIL

files.catbox.moe/pbjgag.mp4

1. Arduino 101 (34 gr)
2. BMP180 Module (4 gr)
3. TIP120 (1 gr)
4. 2.2K Resistor (<1 gr)
5. 5V Incandescent Bulb (<1 gr)
6. 9V Battery (42 gr)
7. Battery Holder (1 gr)
8. Latex Balloons (Helium)
9. String

  1. // Flashing Light Prize (6) Arduino 101 Break Up
  2. // vgmlr
  3. #include "SFE_BMP180.h"
  4. #include "Wire.h"
  5. // BMP180
  6. SFE_BMP180 pressure;
  7. double base;
  8. // States
  9. int last = 0;
  10. int up = 0;
  11. int state = 0;
  12. // TIP120
  13. int light = 7;
  14. void setup()
  15. {
  16. Serial.begin(9600);
  17. pinMode(light, OUTPUT);
  18. digitalWrite(light, LOW);
  19. // BMP180 Working?
  20. if (pressure.begin())
  21. Serial.println("BMP180 init success");
  22. else {
  23. Serial.println("BMP180 init fail (disconnected?)\n\n");
  24. while (1);
  25. }
  26. // Create Base Line
  27. base = getPressure();
  28. Serial.print("Base Line Pressure: ");
  29. Serial.print(base);
  30. Serial.println(" mb");
  31. delay(2000);
  32. }
  33. void loop()
  34. {
  35. double a, P;
  36. // Get Pressure
  37. P = getPressure();
  38. // Different Between Base and New
  39. a = pressure.altitude(P, base);
  40. Serial.print(a * 3.28084, 1);
  41. Serial.println(" feet");
  42. // Higher by 0.5 Feet or More?
  43. if (a >= up) {
  44. if (state == 0) {
  45. digitalWrite(light, HIGH);
  46. state = 1;
  47. } else if (state == 1) {
  48. digitalWrite(light, LOW);
  49. state = 0;
  50. }
  51. }
  52. // Add 0.5 Feet
  53. // Store Last
  54. up = a + 0.1524;
  55. delay(500);
  56. }
  57. double getPressure()
  58. {
  59. char status;
  60. double T, P, p0, a;
  61. status = pressure.startTemperature();
  62. if (status != 0)
  63. {
  64. delay(status);
  65. status = pressure.getTemperature(T);
  66. if (status != 0)
  67. {
  68. status = pressure.startPressure(3);
  69. if (status != 0)
  70. {
  71. delay(status);
  72. status = pressure.getPressure(P, T);
  73. if (status != 0)
  74. {
  75. return (P);
  76. }
  77. }
  78. }
  79. }
  80. }
Update(s)-
1. ptmr | 343025 [Changelog]
10:22 343 025
Dev-
1. TVShow (227) 'CSA'
2. Wedge (Miter) 1.0.0
3. TVShow (228) 'APT'
4. TVProgram (83) 'BXT'
11:51 339 025

Menu
Index
Engineering
Entertainment
Literature
Miscellaneous
Contact
Search
tiktok.com/@vgmlr
youtube.com/@vgmlr
Miter
@vgmlr
=SUM(parts)
86 miters
131 tenons
Subscribe
0.00114