Introduction: Arduino Wireless RF Remote Counter With Dot Matrix Display

P10 is one type of Dot Matrix Display that is often used in arduino / microcontroller projects. like running text, score boards, billboards and so on. In this project I will make a display counter that operates using wireless RF remote control. RF module functions as a trigger signal for the Arduino input pin. Has the same process as the push button method

Step 1: Components and Supplies

In this project we will need the following hardware:

  1. Arduino Board (arduino Uno)
  2. Dot Matrix Display (DMD) P10 32x16
  3. 4 Channel RF Wireless Remote Control Module Controler Kit 315mhz (aliexpress)
  4. Arduino uno proto shield
  5. Wires and a breadboard

Step 2: Wiring

Connect the hardware using a cable in accordance with the schematic.To facilitate the connection of the cable, I use the Arduino proto shield which results can be seen in the picture.

Step 3: Arduino Code

Before starting, make sure that some libraries are installed. The library used is DMD2 by Freetronics. You can install via the library manager on the Arduino IDE. After that copy the code below and upload it to Arduino.

The program contains addition, subtraction, and reset functions. When pin 2 is High, the value of n will increase 1. Conversely, when pin 3 is high, then the value of n will be reduced 1. The maximum value of n is 99. When n reaches the maximum, then n will return to 0. When pin 4 is high, the value of n will be 0 (reset function).

#include <SPI.h>
#include <DMD2.h>
#include <fonts/Droid_Sans_12.h>
#include <fonts/Droid_Sans_16.h>
const int buttonPlus   = 2;  
const int buttonMinus  = 3;
const int buttonReset  = 4;
int buttonState1= 0;
int buttonState2= 0;
int buttonState3= 0;
int n=0;
SoftDMD dmd(1,1); // DMD controls the entire display
DMD_TextBox box(dmd,1,3);  
const char *INTRO = "ARDUCODING.COM";
void setup() {
  pinMode(buttonPlus, INPUT);
  pinMode(buttonMinus, INPUT);
  pinMode(buttonReset, INPUT);
  dmd.setBrightness(10);
  dmd.selectFont(Droid_Sans_12);
  dmd.begin();
  display_intro();
}

void loop() {
  int x=13;
  dmd.selectFont(Droid_Sans_16);
  buttonState1 = digitalRead(buttonPlus);
  buttonState2 = digitalRead(buttonMinus);
  buttonState3 = digitalRead(buttonReset);
  if (buttonState1 == HIGH) {
    dmd.clearScreen();
    n = n + 1;  
    if (n >99){n=0;}
    delay(500);
  }
  if (buttonState2 == HIGH) {
    dmd.clearScreen();
    n = n - 1;
    if (n <0){n=99;}
    delay(500);
  }
  if (buttonState3 == HIGH) {
    dmd.clearScreen();
    n = 0;
    delay(500);
  }
  if (n >9){x=10;}
  if (n >19){x=8;}
  dmd.drawString(x,1,String(n));
}

void display_intro(){
  const char *next = INTRO;
  while(*next) {
    Serial.print(*next);
    box.print(*next);
    delay(300);
    next++;
  }
  delay(600);
  dmd.fillScreen(true);
  delay(500);
  dmd.clearScreen();
  delay(500);
  box.clear();
}

Step 4: Lets Test!

After the upload process is successful, a number display will appear. Just press the button (on the remote) A for the counter Up, B for the counter Down, and C for the reset numbers.

I hope this can be useful. For the other projects/tutorials, please visit my blog on www.arducoding.com.