NodeMCU and 1.8″ SPI ST7735 display
I am using the 1.8″ color ST7735 TFT display a lot. The reason for that is that this display is
Read moreI am using the 1.8″ color ST7735 TFT display a lot. The reason for that is that this display is
Read moreNODEmcu is an inexpensive WiFi module that enables makers and entrepreneurs to develop
Read moreDo you want to know the current weather? This article will show
Read more
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
/* * ForbiddenBit.com * * Dice Arduino */ #define D3 3 #define D4 4 #define D5 5 #define D6 6 #define D7 7 #define D8 8 #define BUTTON 11 int ButtonValue; long DIGIT; void setup () { Serial.begin(9600); pinMode (3, OUTPUT); pinMode (D4, OUTPUT); pinMode (D5, OUTPUT); pinMode (D6, OUTPUT); pinMode (D7, OUTPUT); pinMode (D8, OUTPUT); pinMode (BUTTON, INPUT_PULLUP); randomSeed(analogRead(0)); } void loop() { ButtonValue = digitalRead(BUTTON); if (ButtonValue == LOW) { DIGIT = random(1, 6); Serial.print(DIGIT); //shuffle(); if(DIGIT == 1){ digitalWrite(D3, HIGH); } else if(DIGIT == 2){ digitalWrite (D5, HIGH); digitalWrite (D8, HIGH); } else if(DIGIT == 3){ digitalWrite (D3, HIGH); digitalWrite (D4, HIGH); digitalWrite (D5, HIGH); } else if(DIGIT == 4){ digitalWrite (D3, HIGH); digitalWrite (D5, HIGH); digitalWrite (D6, HIGH); digitalWrite (D8, HIGH); } else if(DIGIT == 5){ digitalWrite (D3, HIGH); digitalWrite (D5, HIGH); digitalWrite (D6, HIGH); digitalWrite (D7, HIGH); digitalWrite (D8, HIGH); } else if(DIGIT == 6){ digitalWrite (D3, HIGH); digitalWrite (D4, HIGH); digitalWrite (D5, HIGH); digitalWrite (D6, HIGH); digitalWrite (D7, HIGH); digitalWrite (D8, HIGH); } delay(3000); } else { digitalWrite (D3, LOW); digitalWrite (D4, LOW); digitalWrite (D5, LOW); digitalWrite (D6, LOW); digitalWrite (D7, LOW); digitalWrite (D8, LOW); } } void off() { digitalWrite (D3, LOW); digitalWrite (D4, LOW); digitalWrite (D5, LOW); digitalWrite (D6, LOW); digitalWrite (D7, LOW); digitalWrite (D8, LOW); } void shuffle() { } |
The gesture control robot is popular common type of
Read moreKart Race Game is a perfect project for beginners who are just starting their
Read moreIn this project I will make a car remotely controlled with Arduino nano, L298N,
Read moreWhat is an oscilloscope? An ‘oscilloscope’, previously called an ‘oscillograph’, and informally known as a scope or o-scope,CRO (for cathode-ray oscilloscope), or DSO (for the more
Read moreLine Follower is a very simple robot ideal for beginner electronics. The robot travels
Read moreThis article shows how to use the SSD1306 0.96 inch I2C OLED display with the Arduino. We’ll show you some
Read more