Rangkaian paling mudah untuk membuat counter penghitung jumlah dengan arduino

7:04 AM Comment

 Membuat counter penghitung jumlah dengan Arduino bisa dilakukan dengan berbagai cara, tergantung pada bagaimana jumlah tersebut dihitung. Misalnya, kita bisa membuat counter dengan tombol (push button) atau sensor seperti sensor inframerah atau sensor ultrasonik. Berikut adalah langkah-langkah sederhana untuk membuat counter menggunakan tombol dan menampilkan hasilnya di LCD 16x2.

Rangkaian paling mudah untuk membuat counter penghitung jumlah dengan arduino


Bahan yang Dibutuhkan

  • 1x Arduino Uno
  • 1x LCD 16x2 + I2C module
  • 1x Push button
  • 1x Resistor 10kΩ
  • Kabel jumper
  • Breadboard

Rangkaian

Sambungkan komponen sebagai berikut:

  • LCD 16x2 dengan I2C
  • VCC → 5V Arduino
  • GND → GND Arduino
  • SDA → A4 Arduino
  • SCL → A5 Arduino
Push Button
  • Satu kaki push button ke pin 2 Arduino
  • Kaki lainnya ke GND melalui resistor 10kΩ (pull-down resistor)
  • Juga sambungkan kaki tersebut ke 5V langsung (tanpa resistor)


#include <Wire.h>
#include <LiquidCrystal_I2C.h>

// Inisialisasi LCD dengan alamat 0x27
LiquidCrystal_I2C lcd(0x27, 16, 2);

const int buttonPin = 2;  // Pin push button
int counter = 0;          // Variabel penghitung
int lastButtonState = LOW;

void setup() {
    pinMode(buttonPin, INPUT);
    lcd.begin();
    lcd.backlight();
    lcd.setCursor(0, 0);
    lcd.print("Counter:");
    lcd.setCursor(0, 1);
    lcd.print(counter);
}

void loop() {
    int buttonState = digitalRead(buttonPin);

    if (buttonState == HIGH && lastButtonState == LOW) {
        counter++;  // Tambah 1 setiap tombol ditekan
        lcd.setCursor(0, 1);
        lcd.print("      ");  // Hapus angka lama
        lcd.setCursor(0, 1);
        lcd.print(counter);
        delay(200);  // Debounce untuk menghindari pembacaan ganda
    }

    lastButtonState = buttonState;
}

Cara Kerja

  • Setiap kali tombol ditekan, angka counter bertambah 1.
  • Angka tersebut ditampilkan pada LCD 16x2.
  • Menggunakan debounce sederhana untuk menghindari pembacaan ganda dari satu kali tekan.

Pengembangan Lebih Lanjut

  • Menggunakan sensor lain seperti sensor infrared untuk mendeteksi objek yang melewati jalur.
  • Menambahkan reset counter dengan tombol tambahan.
  • Menggunakan display lain seperti OLED atau 7-segment untuk tampilan yang lebih kecil.
  • Mau modifikasi atau tambahan fitur tertentu?

jenis transistor yang sering dipakai rangkaian elektronika

10:44 AM Comment

 Dalam rangkaian elektronika, terdapat beberapa jenis transistor yang sering digunakan, tergantung pada fungsi dan aplikasinya. Berikut adalah beberapa jenis transistor yang umum digunakan:

jenis transistor yang sering dipakai rangkaian elektronika

Bipolar Junction Transistor (BJT)

  • NPN: Lebih sering digunakan karena memiliki arus basis yang mengalir ke arah emitor.
  • PNP: Digunakan pada rangkaian yang memerlukan polaritas arus yang berbeda.
  • Contoh transistor: BC547 (NPN), BC557 (PNP), 2N3904 (NPN), 2N3906 (PNP).

Field Effect Transistor (FET)
  • JFET (Junction Field Effect Transistor):
  • Biasanya digunakan dalam amplifier berdaya rendah.
  • Contoh: J310, 2N5457.
  • MOSFET (Metal Oxide Semiconductor Field Effect Transistor):
  • Sering digunakan dalam switching daya tinggi dan rangkaian digital.
  • Dibagi menjadi Enhancement Mode dan Depletion Mode.
  • Contoh: IRF540, IRFZ44N, 2N7000.
Darlington Transistor
  • Terdiri dari dua transistor BJT yang digabung untuk meningkatkan gain arus.
  • Digunakan dalam aplikasi daya tinggi.
  • Contoh: TIP120, TIP122.
UJT (Unijunction Transistor)
  • Digunakan dalam osilator, timer, dan rangkaian pemicu.
  • Contoh: 2N2646.

PSG 4-2 Manchester City: Result

11:01 AM Comment

 

PSG 4-2 Manchester City: Result

Manchester City let a 2-0 lead slip against Paris Saint-Germain as they lost 4-2 in their penultimate Champions League league-phase match.

Jack Grealish and Erling Haaland made it 2-0 to the visitors early in the second half, but Ousmane Dembele and Bradley Barcola made it 2-2 inside five minutes.

Smelling blood, PSG hunted a third goal and found it in the 79th minute with Joao Neves heading in from close range to complete the turnaround. Goncalo Ramos sealed the victory with an emphatic 94th-minute finish.

The defeat leaves Manchester City in an elimination position with just one match left while PSG are well set to make the knockout play-offs.

India vs England, 1st T20I, Straight from Eden Gardens, Kolkata

10:50 AM Comment
India vs England, 1st T20I, Straight from Eden Gardens, Kolkata


 India vs England Highlights: Abhishek Sharma played a fiery knock as India defeated England by seven wickets in the first T20I of the five-match series in Kolkata. Chasing 133, India easily dominated the game and took 1-0 lead. Abhishek Sharma played a fiery knock 79 off 34 balls while Sanju Samson hits 26 off 20 balls as India chased down the target in just 12.5 overs. Apart from them, Tilak Varma also scored 19* off 16 balls. Earlier, Varun Chakravarthy scalped three wickets while Arshdeep Singh, Hardik Pandya, and Axar Patel took two wicket each. For England, Jos Buttler scored 68 off 44 balls

Nintendo Switch 2

12:03 PM Comment

 

Nintendo Switch 2

Nintendo has officially announced the Nintendo Switch 2, set to release in 2025. This new console will continue the hybrid design of its predecessor, allowing for both handheld and home console gaming. 

Key Features:

  • Larger Display: The Switch 2 features a larger screen with thinner bezels, enhancing the gaming experience. 
  • Redesigned Joy-Con Controllers: The Joy-Cons have been updated with a more comfortable design and a new magnetic attachment system. 
  • Backward Compatibility: Players will be able to enjoy their existing Nintendo Switch games on the new console. 

More detailed information, including specific hardware specifications, pricing, and launch titles, is expected to be revealed during a Nintendo Direct event scheduled for April 2, 2025. Following this event, Nintendo plans to host hands-on sessions in various cities worldwide, allowing fans to experience the Switch 2 firsthand. 

nintendo switch games

11:54 AM Comment

 

nintendo switch games


The Nintendo Switch has an extensive library of games spanning various genres. Here are some popular and highly rated titles across different categories:

Adventure and Action

  • The Legend of Zelda: Breath of the Wild: An open-world masterpiece with exploration, puzzles, and combat.
  • The Legend of Zelda: Tears of the Kingdom: A sequel to Breath of the Wild with new mechanics and an expanded world.
  • Metroid Dread: A thrilling 2D action-adventure game with fast-paced combat and exploration.
  • Bayonetta 3: An over-the-top action game with stylish combat.

Platformers

  • Super Mario Odyssey: A 3D platforming adventure with creative levels and mechanics.
  • Donkey Kong Country: Tropical Freeze: A challenging and beautifully designed side-scrolling platformer.
  • Kirby and the Forgotten Land: Kirby’s first full 3D adventure with charming visuals and gameplay.

Role-Playing Games (RPGs)

  • Pokémon Scarlet and Violet: Open-world Pokémon adventures with new mechanics.
  • Xenoblade Chronicles 3: A sprawling JRPG with an epic story and stunning environments.
  • Fire Emblem Engage: A tactical RPG with a rich story and strategic battles.

Party and Multiplayer Games

  • Mario Kart 8 Deluxe: The ultimate kart racing game for all ages.
  • Super Smash Bros. Ultimate: A crossover fighting game featuring characters from across gaming history.
  • Overcooked! All You Can Eat: A chaotic and fun co-op cooking game.

Indie and Puzzle Games

  • Hollow Knight: A beautiful and challenging metroidvania with a deep story.
  • Stardew Valley: A relaxing farming simulator with RPG elements.
  • Celeste: A tough but rewarding platformer with an emotional narrative.

Family and Casual Games

  • Animal Crossing: New Horizons: A life-simulation game where you build your dream island.
  • Splatoon 3: A colorful multiplayer shooter with fun game modes.
  • Luigi’s Mansion 3: A spooky but charming adventure with creative puzzles.

Sports and Fitness

  • Nintendo Switch Sports: A motion-controlled sports game featuring tennis, bowling, and more.
  • Ring Fit Adventure: A fitness-focused RPG that combines exercise with gaming.
Let me know if you’re looking for games in a specific genre or for a particular type of experience!