@grlind I was able to get to work in Ardunio I just combine the DHT into the main sketch all things good though the pressure reading are off... I owuld like to see the uflow - I have not done anything in uflow want to try it.. Is your code posted somewhere?
Latest posts made by grlind
-
RE: Env vs Hat Env
-
Linker errors and Arduiono setup for ENV Hat
I am having problems linking the example for the M5Sitckc environmental module from github.. I am new to Arduino-- and have created a sketch call MstickC_ENVHat and copied all the code modules into the sketch in "tabs" so I have the main sketch MstickC_ENVHat, and the following in tabs DHT12.CPP, DHT12.h, bmm150.cpp, bmm150.h, bmm150_defs.h
https://github.com/m5stack/M5StickC/tree/master/examples/Hat/ENV
I guess I just need to understand how to make this example work as I am not familiar how to get this work?
I am getting linker errors...
Linking everything together...
"C:\Users\grlind\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-80-g6c4433a-5.2.0/bin/xtensa-esp32-elf-gcc" -nostdlib "-LC:\Users\grlind\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/lib" "-LC:\Users\grlind\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2/tools/sdk/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception -Wl,--start-group "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\sketch\bmm150.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\AXP192.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\Fonts\Font16.c.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\Fonts\Font32rle.c.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\Fonts\Font64rle.c.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\Fonts\Font72rle.c.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\Fonts\Font7srle.c.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\Fonts\glcdfont.c.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\IMU.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\M5Display.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\M5StickC.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\RTC.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\utility\In_eSPI.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\utility\Sprite.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\arduino_248878\utility\qrcode.c.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\Wire\Wire.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\SPI\SPI.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\FS\FS.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\FS\vfs_api.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\libraries\Adafruit_BMP280_Library\Adafruit_BMP280.cpp.o" "C:\Users\grlind\AppData\Local\Temp\arduino_cache_689927\core\core_fc9f877b7a275e98ef306097fe742a79.a" -lgcc -lopenssl -lbtdm_app -lfatfs -lwps -lcoexist -lwear_levelling -lesp_http_client -lprotobuf-c -lhal -lnewlib -ldriver -lbootloader_support -lpp -lfreemodbus -lmesh -lsmartconfig -ljsmn -lwpa -lethernet -lphy -lfrmn -lapp_trace -lfr_coefficients -lconsole -lulp -lwpa_supplicant -lfreertos -lbt -lmicro-ecc -lesp32-camera -lcxx -lxtensa-debug-module -ltcp_transport -lmdns -lvfs -lmtmn -lesp_ringbuf -lsoc -lcore -lfb_gfx -lsdmmc -llibsodium -lcoap -ltcpip_adapter -lprotocomm -lesp_event -limage_util -lc_nano -lesp-tls -lasio -lrtc -lspi_flash -lwpa2 -lwifi_provisioning -lesp32 -lface_recognition -lapp_update -lnghttp -lspiffs -lface_detection -lespnow -lnvs_flash -lesp_adc_cal -llog -ldl_lib -lsmartconfig_ack -lexpat -lfd_coefficients -lm -lmqtt -lc -lheap -lmbedtls -llwip -lnet80211 -lesp_http_server -lpthread -ljson -lesp_https_ota -lstdc++ -Wl,--end-group -Wl,-EL -o "C:\Users\grlind\AppData\Local\Temp\arduino_build_90317/MstickC_ENVhat.ino.elf"
C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o:(.literal._Z4loopv+0x34): undefined reference to `DHT12::readTemperature(unsigned char)'C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o:(.literal._Z4loopv+0x38): undefined reference to `DHT12::readHumidity()'
C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o:(.literal.startup._GLOBAL__sub_I_dht12+0x4): undefined reference to `DHT12::DHT12(unsigned char, unsigned char)'
C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o: In function `setup()':
\ccanet\home\grlind\My Documents\Arduino\MstickC_ENVhat/MstickC_ENVhat.ino:116: undefined reference to `DHT12::readTemperature(unsigned char)'
\ccanet\home\grlind\My Documents\Arduino\MstickC_ENVhat/MstickC_ENVhat.ino:119: undefined reference to `DHT12::readHumidity()'
C:\Users\grlind\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o: In function `_GLOBAL__sub_I_dht12':
\ccanet\home\grlind\My Documents\Arduino\MstickC_ENVhat/MstickC_ENVhat.ino:161: undefined reference to `DHT12::DHT12(unsigned char, unsigned char)'
collect2.exe: error: ld returned 1 exit status
Using library arduino_248878 at version 0.0.5 in folder: \ccanet\home\grlind\My Documents\Arduino\libraries\arduino_248878
Using library Wire at version 1.0.1 in folder: C:\Users\grlind\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire
Using library SPI at version 1.0 in folder: C:\Users\grlind\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI
Using library FS at version 1.0 in folder: C:\Users\grlind\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\FS
Using library Adafruit_Unified_Sensor at version 1.0.2 in folder: \ccanet\home\grlind\My Documents\Arduino\libraries\Adafruit_Unified_Sensor
Using library Adafruit_BMP280_Library at version 1.0.4 in folder: \ccanet\home\grlind\My Documents\Arduino\libraries\Adafruit_BMP280_Library
exit status 1
Error compiling for board M5Stick-C. -
RE: Env vs Hat Env
Can you tell me how to compile the code I am confused on how to bring the code into the Arduino IDE.
I created a main sketch and then copied the code into Mstickc_ENVHat, I also created 4 tabs.. DHT12.cpp, DHT12.h, and bmm150.cpp, and bmm150.h, and bmm150_defs.h...
I get errors
C:\Users\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o:(.literal._Z4loopv+0x34): undefined reference to `DHT12::readTemperature(unsigned char)'
C:\Users\AppData\Local\Temp\arduino_build_90317\sketch\MstickC_ENVhat.ino.cpp.o:(.literal._Z4loopv+0x38): undefined reference to `DHT12::readHumidity()'