Can you check the output voltage of the smartphone charger with no load and then when it is connected to the T4? It may be producing more than 5V. Chargers aren't power supplies.
Pete
In init_priv you need to change Wire.begin() to Wire2.begin().
Also, remove Wire2.begin(0x27) from the setup function - it will be done by init_priv.
Pete
This code (don't remember where I found it) will scan for I2C devices on Wire, Wire1 and Wire2 on a T4.1.
// i2c_scanner
// http://playground.arduino.cc/Main/I2cScanner
//
// Version 1
// This program (or code...
FastCRC and the website also agree when given the input as a character string.
/*
FastCRC-Example
(c) Frank Boesing 2014
*/
#include <FastCRC.h>
FastCRC8 CRC8;
You have to encode those 24 bits as 3 bytes - in hex they are 0x64,0x29,0x22. This website gives 0x93 as the CRC8 of those three bytes.
FastCRC agrees:
/*
FastCRC-Example
(c) Frank Boesing 2014
*/
#include...
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...