- Bemutatkozott a Lexar legfrissebb, strapabíró memóriakártyája, a Blue Plus
- A G.Skill DDR5 memóriájával lassacskán a 13 GHz-es határt ostromolják
- Combosnak tűnik a Thermalright legfrissebb, kéttornyos CPU-hűtője
- Sok memóriát spórol a neurális textúratömörítés
- Nagyon érzékeny lett a játékok archiválására a Nintendo
- Milyen monitort vegyek?
- Sok memóriát spórol a neurális textúratömörítés
- Sony MILC fényképezőgépcsalád
- Apple MacBook
- NVIDIA GeForce RTX 5070 / 5070 Ti (GB205 / 203)
- iPad topik
- Iszonyatos mennyiségű hulladékkal járhat a Windows 10 terméktámogatásának vége
- Kormányok / autós szimulátorok topikja
- CPU léghűtés kibeszélő
- Házi barkács, gányolás, tákolás, megdöbbentő gépek!
-
PROHARDVER!
Arduino hardverrel és szoftverrel foglakozó téma. Minden mikrovezérlő ami arduinoval programozható, és minden arduino program, board, és hardverrel kapcsolatos kérdések helye.
Új hozzászólás Aktív témák
-
Imy
veterán
Arduinoval szeretnék megoldani egy ellenállás mérést, ami hőt mér, és egy KY-040-el egy hőmérséklet beállítást. Ha ezt a kódot [link] futtatom a doksi végén, akkor hiba nélkül megy az encoder poziciójának számolása. Ha ez után beteszem a hőmérséklet mérést, akkor már nem mey, össze-vissza számol:
// Use software SPI: CS, DI, DO, CLK
Adafruit_MAX31865 thermo = Adafruit_MAX31865(10, 11, 12, 13);
// use hardware SPI, just pass in the CS pin
//Adafruit_MAX31865 thermo = Adafruit_MAX31865(10);
// The value of the Rref resistor. Use 430.0 for PT100 and 4300.0 for PT1000
// The 'nominal' 0-degrees-C resistance of the sensor
// 100.0 for PT100, 1000.0 for PT1000
//Resistance meter
float Ra = 0.00385;
float R0 = 20.9;
float Rt;
float T;
//HW-040 encoder
int pinA = 3; // Connected to CLK on KY-040
int pinB = 4; // Connected to DT on KY-040
int encoderPosCount = 0;
int pinALast;
int aVal;
boolean bCW;
void setup() {
Serial.begin(115200);
Serial.println("Adafruit MAX31865 PT100 Sensor Test!");
thermo.begin(MAX31865_2WIRE); // set to 2WIRE or 4WIRE as necessary
pinMode (pinA, INPUT);
pinMode (pinB, INPUT);
pinALast = digitalRead(pinA);
}
void loop() {
/////////////ENCODER//////////////////////////////////////////////////////////////////////////////
aVal = digitalRead(pinA);
if (aVal != pinALast) { // Means the knob is rotating
// if the knob is rotating, we need to determine direction
// We do that by reading pin B.
if (digitalRead(pinB) != aVal) { // Means pin A Changed first - We're Rotating Clockwise
encoderPosCount ++;
bCW = true;
} else {// Otherwise B changed first and we're moving CCW
bCW = false;
encoderPosCount--;
}
Serial.print ("Rotated: ");
if (bCW) {
Serial.println ("clockwise");
} else {
Serial.println("counterclockwise");
}
}
pinALast = aVal;
Serial.print("Encoder Position: ");
Serial.println(encoderPosCount);
///////////MAX31865////////////////////////////////////////////////////////////////////////////
uint16_t rtd = thermo.readRTD();
//Serial.print("RTD value: "); Serial.println(rtd);
float ratio = rtd;
ratio /= 32768;
Rt = RREF * ratio;
T = ((Rt - R0) / (R0 * Ra));
//Serial.print("Ratio = "); Serial.println(ratio,8);
Serial.print("Resistance = "); Serial.print(RREF * ratio, 2); Serial.println(" ohm");
//Serial.print("Temperature = "); Serial.println(thermo.temperature(RNOMINAL, RREF));
Serial.print("PakaTemp = "); Serial.print(T, 2); Serial.println(" C");
// Check and print any faults
uint8_t fault = thermo.readFault();
if (fault) {
Serial.print("Fault 0x"); Serial.println(fault, HEX);
if (fault & MAX31865_FAULT_HIGHTHRESH) {
Serial.println("RTD High Threshold");
}
if (fault & MAX31865_FAULT_LOWTHRESH) {
Serial.println("RTD Low Threshold");
}
if (fault & MAX31865_FAULT_REFINLOW) {
Serial.println("REFIN- > 0.85 x Bias");
}
if (fault & MAX31865_FAULT_REFINHIGH) {
Serial.println("REFIN- < 0.85 x Bias - FORCE- open");
}
if (fault & MAX31865_FAULT_RTDINLOW) {
Serial.println("RTDIN- < 0.85 x Bias - FORCE- open");
}
if (fault & MAX31865_FAULT_OVUV) {
Serial.println("Under/Over voltage");
}
thermo.clearFault();
}
Serial.println();
//delay(1000);
}
Új hozzászólás Aktív témák
- Bomba ár! HP ProBook 440 G7 - i5-10GEN I 8GB I 256SSD I HDMI I 14" FHD I Cam I W11 I Gar
- Konzol felvásárlás!! Xbox Series S, Xbox Serries X
- ÚJ HP EliteBook 840 G8 - 14"FHD IPS - i5-1145G7 - 32GB - 512GB SSD - Win10 - 6 hónap Garancia
- Apple iPad (9th Generáció) Wi-fi + Cellular, 1 Év Garanciával
- Apple iPhone 14 Pro Max / 256 GB / 88% akkumulátor / 1év Garanciával / Gyári Független
Állásajánlatok
Cég: Promenade Publishing House Kft.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest