Skocz do zawartości

Mrpatryk

Użytkownicy
  • Zawartość

    170
  • Rejestracja

  • Ostatnio

Reputacja

2 Neutralna

O Mrpatryk

  • Ranga
    5/10
  • Urodziny 18.01.1995

Informacje

  • Płeć
    Mężczyzna
  • Lokalizacja
    Podkarpacie
  • Zainteresowania
    Jazda na rowerze, koszykówka, programowanie, projektowanie + wykonanie mebli na zamowienie

Ostatnio na profilu byli

271 wyświetleń profilu
  1. Aktualnie ten maly 3.2 cala na arduino. A tamten duzy na 2xesp32
  2. Aktualnie do niczego wyświetlam wyniki z pomiarów, aktualnie zastanawiam się coraz poważniej nad kupnem ekranu z firmy NEXTION 10,1', chce to zastosować do inteligencji budynkowej.
  3. Wszystko zależało od biblioteki nie mogłem żadnej dopasować a Google nic nie doradziło . Otóż taka dopiero dała rade <MCUFRIEND_kbv.h> ;]
  4. Witam, zakupiłem u skośnookich "braci" lcd TFT 3,2' z sterownikiem R61509 i niestety nigdzie nie mogę znaleźć biblioteki do niego ani żadnych tutoriali. Świeci się tylko na biało, touchpad udało się mi jakoś uruchomic i mam odczyty po serialu, ale za chiny nie mogę wyświetlić niczego ;/ Ktoś ma jakiś poradnik oraz biblioteki do niego? https://www.aliexpress.com/item/32952886221.html?spm=a2g0s.9042311.0.0.27424c4d61B3By
  5. #include <DigiCDC.h> #include <Wire.h> #include <SPI.h> #include <Adafruit_Sensor.h> #include "Adafruit_BME680.h" #define SEALEVELPRESSURE_HPA (1013.25) Adafruit_BME680 bme; // I2C void setup() { SerialUSB.begin(); SerialUSB.println(F("BME680 test")); if (!bme.begin(0x76)) { SerialUSB.println("Could not find a valid BME680 sensor, check wiring!"); while (1); } bme.setTemperatureOversampling(BME680_OS_8X); bme.setHumidityOversampling(BME680_OS_2X); bme.setPressureOversampling(BME680_OS_4X); bme.setIIRFilterSize(BME680_FILTER_SIZE_3); bme.setGasHeater(320, 150); } void loop() { if (! bme.performReading()) { SerialUSB.println("Failed to perform reading :("); return; } SerialUSB.print("Temperature = "); SerialUSB.print(bme.temperature); SerialUSB.println(" *C"); SerialUSB.print("Pressure = "); SerialUSB.print(bme.pressure / 100.0); SerialUSB.println(" hPa"); SerialUSB.print("Humidity = "); SerialUSB.print(bme.humidity); SerialUSB.println(" %"); SerialUSB.print("Gas = "); SerialUSB.print(bme.gas_resistance / 1000.0); SerialUSB.println(" KOhms"); SerialUSB.print("Approx. Altitude = "); SerialUSB.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); SerialUSB.println(" m"); SerialUSB.println(); SerialUSB.delay(2000); } Otrzymuje taki oto bład Warning: Board tiny:tiny:attiny85at1 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY85AT1 Warning: Board tiny:tiny:attiny24at16 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY24AT16 Warning: Board tiny:tiny:attiny84at16 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY84AT16 Warning: Board tiny:tiny:attiny4313at8 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY4313AT8 Warning: Board tiny:tiny:attiny85at16p doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY85AT16P Warning: Board tiny:tiny:attiny44at8 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY44AT8 Warning: Board tiny:tiny:attiny2313at8 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY2313AT8 Warning: Board tiny:tiny:attiny45at1 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY45AT1 Warning: Board tiny:tiny:attiny4313at1 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY4313AT1 Warning: Board tiny:tiny:attiny84at8 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY84AT8 Warning: Board tiny:tiny:attiny85at128 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY85AT128 Warning: Board tiny:tiny:attiny84at1 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY84AT1 Warning: Board tiny:tiny:attiny25at8 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY25AT8 Warning: Board tiny:tiny:attiny44at1 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY44AT1 Warning: Board tiny:tiny:attiny2313at1 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY2313AT1 Warning: Board tiny:tiny:attiny85at8 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY85AT8 Warning: Board tiny:tiny:attiny45at8 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY45AT8 Warning: Board tiny:tiny:attiny25at1 doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY25AT1 Warning: Board tiny:tiny:attiny85at16e doesn't define a 'build.board' preference. Auto-set to: TINY_ATTINY85AT16E In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In member function 'void SPISettings::init_AlwaysInline(uint32_t, uint8_t, uint8_t)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:146:16: error: 'SPE' was not declared in this scope spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) | ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:146:27: error: 'MSTR' was not declared in this scope spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) | ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:146:65: error: 'DORD' was not declared in this scope spcr = _BV(SPE) | _BV(MSTR) | ((bitOrder == LSBFIRST) ? _BV(DORD) : 0) | ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::beginTransaction(SPISettings)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:203:5: error: 'SPCR' was not declared in this scope SPCR = settings.spcr; ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:204:5: error: 'SPSR' was not declared in this scope SPSR = settings.spsr; ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static uint8_t SPIClass::transfer(uint8_t)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:209:5: error: 'SPDR' was not declared in this scope SPDR = data; ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:217:14: error: 'SPSR' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; // wait ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:217:25: error: 'SPIF' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; // wait ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static uint16_t SPIClass::transfer16(uint16_t)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:223:11: error: 'SPCR' was not declared in this scope if (!(SPCR & _BV(DORD))) { ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:223:22: error: 'DORD' was not declared in this scope if (!(SPCR & _BV(DORD))) { ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:224:7: error: 'SPDR' was not declared in this scope SPDR = in.msb; ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:226:16: error: 'SPSR' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:226:27: error: 'SPIF' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:230:16: error: 'SPSR' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:230:27: error: 'SPIF' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:233:7: error: 'SPDR' was not declared in this scope SPDR = in.lsb; ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:235:16: error: 'SPSR' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:235:27: error: 'SPIF' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:239:16: error: 'SPSR' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:239:27: error: 'SPIF' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::transfer(void*, size_t)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:247:5: error: 'SPDR' was not declared in this scope SPDR = *p; ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:250:16: error: 'SPSR' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:250:27: error: 'SPIF' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:255:14: error: 'SPSR' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:255:25: error: 'SPIF' was not declared in this scope while (!(SPSR & _BV(SPIF))) ; ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::setBitOrder(uint8_t)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:292:31: error: 'SPCR' was not declared in this scope if (bitOrder == LSBFIRST) SPCR |= _BV(DORD); ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:292:43: error: 'DORD' was not declared in this scope if (bitOrder == LSBFIRST) SPCR |= _BV(DORD); ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:293:10: error: 'SPCR' was not declared in this scope else SPCR &= ~(_BV(DORD)); ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:293:24: error: 'DORD' was not declared in this scope else SPCR &= ~(_BV(DORD)); ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::setDataMode(uint8_t)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:298:5: error: 'SPCR' was not declared in this scope SPCR = (SPCR & ~SPI_MODE_MASK) | dataMode; ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::setClockDivider(uint8_t)': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:303:5: error: 'SPCR' was not declared in this scope SPCR = (SPCR & ~SPI_CLOCK_MASK) | (clockDiv & SPI_CLOCK_MASK); ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:304:5: error: 'SPSR' was not declared in this scope SPSR = (SPSR & ~SPI_2XCLOCK_MASK) | ((clockDiv >> 2) & SPI_2XCLOCK_MASK); ^ C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::attachInterrupt()': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:309:42: error: 'SPCR' was not declared in this scope inline static void attachInterrupt() { SPCR |= _BV(SPIE); } ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:309:54: error: 'SPIE' was not declared in this scope inline static void attachInterrupt() { SPCR |= _BV(SPIE); } ^ In file included from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:4:0: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h: In static member function 'static void SPIClass::detachInterrupt()': C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:310:42: error: 'SPCR' was not declared in this scope inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); } ^ In file included from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\io.h:99:0, from c:\users\patryk\appdata\local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\avr\include\avr\interrupt.h:38, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/WProgram.h:8, from C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\cores\tiny/Arduino.h:4, from sketch\sketch_aug11a.ino.cpp:1: C:\Users\Patryk\AppData\Local\Arduino15\packages\digistump\hardware\avr\1.6.7\libraries\SPI/SPI.h:310:55: error: 'SPIE' was not declared in this scope inline static void detachInterrupt() { SPCR &= ~_BV(SPIE); } ^ In file included from C:\Users\Patryk\Documents\Arduino\libraries\Adafruit_BME680_Library/bme680.h:63:0, from C:\Users\Patryk\Documents\Arduino\libraries\Adafruit_BME680_Library/Adafruit_BME680.h:35, from C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:6: C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino: In function 'void setup()': C:\Users\Patryk\Documents\Arduino\libraries\Adafruit_BME680_Library/bme680_defs.h:74:31: error: 'U8_C' was not declared in this scope #define UINT8_C(x) U8_C(x) ^ C:\Users\Patryk\Documents\Arduino\libraries\Adafruit_BME680_Library/bme680_defs.h:187:23: note: in expansion of macro 'UINT8_C' #define BME680_OS_8X UINT8_C(4) ^ C:\Users\Patryk\Documents\Arduino\sketch_aug11a\sketch_aug11a.ino:23:33: note: in expansion of macro 'BME680_OS_8X' bme.setTemperatureOversampling(BME680_OS_8X); ^ exit status 1 Błąd kompilacji dla płytki Digispark (Default - 16.5mhz). Ktoś ma jakiś pomysł? Pewnie czegoś brakuje w bibliotekach ;/
  6. No prawie wszystko dalej wyniki zawyzone od temperatury, a znow cisnienie zaniża
  7. Ogarnąłem brakowalo w pliku #include <avr/pgmspace.h> #if (defined(__AVR__)) #include <avr\pgmspace.h> #else #include <pgmspace.h> #endif teraz wszystko smiga
  8. okej , będę zaraz działał. dziwne bo dla arduino się kompiluje to wszystko a dla esp32 nie ... ;/
  9. #include <Wire.h> #include <SPI.h> #include <Adafruit_Sensor.h> #include "Adafruit_BME680.h" #define SEALEVELPRESSURE_HPA (1013.25) Adafruit_BME680 bme; // I2C void setup() { Serial.begin(9600); while (!Serial); Serial.println(F("BME680 test")); if (!bme.begin(0x76)) { Serial.println("Could not find a valid BME680 sensor, check wiring!"); while (1); } // Set up oversampling and filter initialization bme.setTemperatureOversampling(BME680_OS_8X); bme.setHumidityOversampling(BME680_OS_2X); bme.setPressureOversampling(BME680_OS_4X); bme.setIIRFilterSize(BME680_FILTER_SIZE_3); bme.setGasHeater(320, 150); // 320*C for 150 ms } void loop() { if (! bme.performReading()) { Serial.println("Failed to perform reading :("); return; } Serial.print("Temperature = "); Serial.print(bme.temperature); Serial.println(" *C"); Serial.print("Pressure = "); Serial.print(bme.pressure / 100.0); Serial.println(" hPa"); Serial.print("Humidity = "); Serial.print(bme.humidity); Serial.println(" %"); Serial.print("Gas = "); Serial.print(bme.gas_resistance / 1000.0); Serial.println(" KOhms"); Serial.print("Approx. Altitude = "); Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); Serial.println(" m"); Serial.println(); delay(3000); } podłaczony scl do D22 i sda do D21 zasilanie 3,3v oraz wspolne gnd, pod arduino dziala ale też zawyża i cały czas pokazuje 990hPa. Aktualnie problem z wgraniem tego kodu na esp32 ... ;/ Teraz ma jakiś problem i wgl się ten program nie kompiluje ... C:\Users\Patryk\Documents\Arduino\libraries\Adafruit_Unified_Sensor\Adafruit_Sensor.cpp:2:26: fatal error: avr/pgmspace.h: No such file or directory compilation terminated. exit status 1 Błąd kompilacji dla płytki DOIT ESP32 DEVKIT V1.
  10. zauważyłem również że barometr nie pokazuje ciśnienia ;/ tylko 990 ciągle bez zmian.
  11. Blednę odczyty, zawyżanie temperatur po 5/6 stopni. Ma ktoś jakieś doświadczenie ??
  12. Czaje o czym mówisz , pod D4 = 2 , D2=4 wiem wiem, ale dziwne bo wszystko wczesniej działało tak to jest z chińskimi zamiennikami Posiadam nodemcu v3 wemos jakiś bubel :))
  13. No właśnie ja też jestem zdziwiony, że to zadziałało a przedtem mialem podlaczone pod D0 a działało na D2 ... nie wiem jakim cudem .
×
×
  • Utwórz nowe...