How to Wire a Button to Arduino? Using Internal Pull-Up.
To add a push button or a switch to Arduino with relatively short wires you need
  • two wires
  • a button or a switch
  • to enable internal pull-up in code
    pinMode(pinNumber, INPUT_PULLUP);
N-Channel vs P-Channel. Choosing a MOSFET for Arduino.

Arduino pins can directly turn ON very low power components like small LEDs. MOSFETs are great if you need to switch ON and OFF more powerful devices that also may use higher input voltage than Arduino's 5V.

So, which type of MOSFET should you use? If you need to...

Wiring DFPlayer Mini (MP3 Module) to Arduino. Stereo/Mono Diagrams.

DFPlayer Mini is a cheap MP3 player module with a Micro SD card slot. You can load your MP3 files onto an SD card, and Arduino can send a command to start playing a song.

For this tutorial, you need:

  • A DFPlayer Mini module
  • A Micro SD card...
P-Channel MOSFET and Arduino. Switching a 12V Motor.

Connecting a P-Channel MOSFET to an Arduino can be a little trickier than an N-Channel MOSFET, but if you understand how it works, then it's not very complicated.

The main thing to understand about P-Channel MOSFETs is that they activate when the voltage on the Gate terminal is lower than the Source...

How to Make Auto Power OFF Circuit with Arduino?

The charge of a battery is limited. It would be nice if your battery-powered device could power itself OFF if it has been idle for some time.

With a couple of MOSFETs and some resistors, you can create a circuit that makes it possible for your Arduino to use a Digital Output pin to shut itself OFF.

To build a self power down circuit you need: ...

How to Power Your Arduino? Vin, 5V, and 3.3V Pins.

The Vin, 5V, and 3.3V pins are Arduino power pins.

You can use the Vin pin to Power your Arduino with an unregulated 7 to 12-volt power source. Like a 9V battery or a wall adapter that is in the range of 7 to 12 volts.

Alternatively, you can power your Arduino through the 5V pin with an external regulated 5V power supply. It can be a wall adapter that gives out constant 5V or a DC-DC converter...

Step-By-Step: OV7670 Camera with Arduino: 10FPS Video

You can buy very cheap OV7670 camera modules from Banggood, eBay, or Aliexpress.

Getting them to work with an Arduino can be quite complicated. It requires a lot of connections and precise timing on the software side.

This article is a step-by-step guide for building all the necessary connections on a breadboard. Then you can use my example code to run a 10fps video live stream on a tiny display...

Arduino Inline Keyword. Faster Code With Forced Inline Functions.

Sometimes every microsecond counts, and you can't even afford time on a function call. One such example is my OV7670 camera module project:

You could write everything time-critical into one function to avoid calls. But Having separate methods for sub-routines is still necessary for code readability and re-usability...

50kg Load Cells with HX711 and Arduino. 4x, 2x, 1x Diagrams.

You can buy a relatively cheap bathroom scale load cells from China. Each cell is rated for 50 kg / 110 lbs. They can safely handle 120% overload (60 kg / 130 lbs per cell) and the ultimate overload of 150% (75 kg / 165 lbs per cell). Going over the maximum limit can permanently damage the load cells...

Four Wire Load Cell with HX711 and Arduino.

You can buy relatively cheap four-wire load cells from Banggood, eBay, or Aliexpress.

They come with a wide variety of weight ranges, starting from one kilogram up to a couple of hundred kilograms.

The easiest way to get a weigh reading from these to an Arduino is to use the HX711 amplifier module...

Programming ESP-12E / ESP-12F / NodeMCU With Arduino IDE

The ESP-12E and ESP-12F are ESP8266 boards. ESP8266 is a low-cost WiFi-enabled microchip.

This article will explain how to prepare your Arduino IDE to upload sketches into the ESP8266 microcontroller and connect to an ESP-12E / ESP-12F board over USB...

Programming ESP-12E / ESP-12F / NodeMCU Over Wi-Fi

The ESP-12E and ESP-12F (including the NodeMCU) are ESP8266 boards. ESP8266 is a low-cost Wi-Fi-enabled microchip that you can program over a serial or Wi-Fi connection.

Programming an ESP-12E / ESP-12F / NodeMCU over Wi-Fi is a Catch-22. You need to run an Arduino sketch capable of receiving code updates over Wi-Fi...