Everyone Wants Automation With a Big Display!

Introduction: Everyone Wants Automation With a Big Display!

About: Do you like technology? Follow my channel on Youtube and my Blog. In them I put videos every week of microcontrollers, arduinos, networks, among other subjects.

Yes, another video about DISPLAYS, a subject I really like! Do you know why?

Because with it, it’s possible to improve the user interface.

Automation users need a good visual indication. So I bring to you, an example with a 7 inch display, with capacitive touch and a Raspberry Pi with QT Creator (graphics library).

Step 1: Everyone Wants Automation With a Big Display!

In this post, I’ll present a QT Creation automation, using new components and an example of servo-motor activation, using the PWM exit of Raspberry Pi. We will also use a 4-relay module in our automation.

Step 2: Resources Used

· Raspberry Pi 3 model B+

· 2x Servos Towerpro MG996R

· 4-relay module

· 2x lamps

· Extension Socket

· Fonte 5V

· Arduino Power Adapter

· Jumpers

· Protoboard

· Display 7inch HDMI LCD 7’’ (Touch Screen)

· Fan

Step 3: Pinout Raspberry Pi 3 Model B

Step 4: Mounting

Step 5: Raspberry Pi 3 Model B PMW Pins

The PWM pins in Raspberry Pi 3 are shown in the image above. We use the channel 0 for one servo-motor and channel 1 for other. We must pay attention in the GPIO used by the Wiring Pi (image on the right), so we’ll use the GPIO1 and GPIO24 and not the BCM pins (Broadcom SOC channel) GPIO10 e GPIO19.

https://www.electronicwings.com/raspberry-pi/raspberry-pi-pwm-generation-using-python-and-c

Step 6: QT Project Interface

PS. The push button component doesn’t support giffs, so we will use a label (lblFan) to reproduce the giff. Also, we’ll use an invisible push button called imgFan, placed over the label, this way we can work with the click event.

There is another way to make it work, creating a clickable label class, but we opted to simplifly the code, so we are not going to use this way.

Step 7: Code: Declarations and Variables

Step 8: Constructor and Destructor

Step 9: Code: SetPins

Step 10: Code: UpdateStatus

Step 11: Slider Events

Step 12: Lamps Buttons Events

Step 13: ChangeImageButton

Step 14: Fan Button Event

Step 15: Checkbox Event That Shows or Hides the Mouse Cursor

Step 16: Download the Files

Be the First to Share

    Recommendations

    • Make it Fly Challenge

      Make it Fly Challenge
    • Backyard Contest

      Backyard Contest
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    Comments