I don't think that would be useful. Having an option of using sign-magnitude for the DHT22 is pointless and potentially confusing because it only uses twos-complement. Similarly, there's not much point having an option...
I see one potential problem with your fix. The DHT21 might use sign-magnitude in which case you would need to split the DHT21 and DHT22 cases so that they handle the negative numbers correctly for that device.
Pete
Replace the debug printf with this which will add my interpretation of the temperature (I hope - untested):
Serial.printf("DEBUG: %02X %02X %02X %02X : %02X (%6.2f)\n",
data,data,data,data ,data,...
What is the actual temperature?
I'm suspicious that the device actually represents the temperature as twos-complement, whereas both libraries treat it as sign-magnitude.
If it is twos-complement, FFCF would...
Try this:
DHT dht(DHTPIN, DHTTYPE, 27);
and see my old thread about problems with the DHT22 on Teensy 3.
If that doesn't help, let's try adding a debugging print in the library. Near the end of the read()...
You are reading the RMS result thousands of times a second even when it is not available. Try changing your loop function to this:
void loop()
{
if(rms1.available()) {
x = rms1.read();
if(x != 0.0 && s ==...
I tried your code with an M-Audio keyboard which has a modwheel. No matter how much I roll the wheel and play chords and arpeggios, the total note count is always zero at the end.
You didn't include your...
#define LockB 35
#define LockLed 30
These two pins are on the bottom of the T4.0. Are you actually using them? Looks like you have spare pins on the top which would be a lot easier to use.
Pete