After getting my Humidity/Temperature with an 8x16 MAX7219 working with your help the display is too bright. I've tried searching through this group trying to find how to change Intensity. I think it needs to be set from 0-15. Any ideas on the command I need. Thank You.
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 2
#define CLK_PIN 13
#define DATA_PIN 11
#define CS_PIN 10
// Hardware SPI connection
MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
MD_MAX72XX mx = MD_MAX72XX(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
#include <DHT.h>
#include <DHT_U.h>
#define DHTPIN A0 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
DHT dht(DHTPIN, DHTTYPE);
const int buttonPin = 4;
int buttonState = 0;
void setup() {
Serial.begin(9600);
pinMode(buttonPin, INPUT);
P.begin();
dht.begin();
}
void loop() {
buttonState = digitalRead(buttonPin);
// Wait a few seconds between measurements.
delay(2000);
float h = dht.readHumidity();
float f = dht.readTemperature(true);
f = f - 1;
if (buttonState == HIGH)
{
P.setTextAlignment(PA_CENTER);
P.print(h,0);
}else {
P.setTextAlignment(PA_CENTER);
P.print(f,0);
}}