Closed m52520301 closed 4 years ago
Hi, I create a branch that try to solve the issue, I must test If is backward compatible. Give me a feedback Renzo
Hello, I downloaded that new lib for nano 33 IoT. Compile example code "ArduinoOneWireDHT12" is ok, no error message. But after upload the bin to 33 IoT, it just display the message "Failed to read from DHT12 sensor!" from the serial monitor. :(
Try to disable debug variable
//#define DHT_DEBUG
than send me the debug information.
It's difficult without device identify the problem, but we can try.
Bye Renzo
I made the following actions:
// # define DHT_DEBUG
in DHT12.h to#define DHT_DEBUG
After unplugging and pluging USB port, the green light turns on, but the PC cannot find the nano 33 iot. In the Arduino IDE, I can't used serial monitor to collect results of program execution. After press reset button twice quickly, I can see the nano 33 iot boot loader. I still can upload a sketch to it. I can't get any debugging information from Arduino IDE, so I reply this test results to you for your reference.
Hi, I think you must resolve connection problem with your device first, than test other. It's seems a power supply problem, you can try to give power from external source. Bye Renzo
According to your suggestion, I use an external DC 5V power as the power source and recompile the sketch. Unfortunately, the result is the same, it cannot boot into upload mode, and the nano 33 iot still cannot be seen after unplugging and plugging the usb cable. Following are messages that appear when compiling and uploading the sketch. It seems to get stuck after rebooting.
Sketch uses 33608 bytes (12%) of program storage space. Maximum is 262144 bytes. Global variables use 4116 bytes of dynamic memory. Atmel SMART device 0x10010005 found Device : ATSAMD21G18A Chip ID : 10010005 Version : v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48 Address : 8192 Pages : 3968 Page Size : 64 bytes Total Size : 248KB Planes : 1 Lock Regions : 16 Locked : none Security : false Boot Flash : true BOD : true BOR : true Arduino : FAST_CHIP_ERASE Arduino : FAST_MULTI_PAGE_WRITE Arduino : CAN_CHECKSUM_MEMORY_BUFFER Erase flash done in 0.596 seconds
Write 33608 bytes to flash (526 pages)
[=== ] 12% (64/526 pages) [======= ] 24% (128/526 pages) [========== ] 36% (192/526 pages) [============== ] 48% (256/526 pages) [================== ] 60% (320/526 pages) [===================== ] 73% (384/526 pages) [========================= ] 85% (448/526 pages) [============================= ] 97% (512/526 pages) [==============================] 100% (526/526 pages) done in 0.235 seconds
Verify 33608 bytes of flash with checksum. Verify successful done in 0.034 seconds CPU reset. Board at COM11 is not available
Hi, I think you have a problem with your device, if you can't connect to It. First you must resolve the connection issue. Bye Renzo
Hello, When I compile this example named "ArduinoOneWireDHT12", an error occurs and cannot be compiled. The error message is as follows. Any suggestion ?
Arduino:1.8.12 (Windows 7), 開發板:"Arduino NANO 33 IoT" In file included from C:\Users\eric\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.6\cores\arduino/delay.h:23:0, from C:\Users\eric\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.6\cores\arduino/Arduino.h:81, from D:\arduino-1.8.12\libraries\DHT12_sensor_library-master\DHT12.h:32, from D:\arduino-1.8.12\libraries\DHT12_sensor_library-master\DHT12.cpp:28: D:\arduino-1.8.12\libraries\DHT12_sensor_library-master\DHT12.cpp: In constructor 'DHT12::DHT12(uint8_t, bool)':
C:\Users\eric\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.6\variants\nano_33_iot/variant.h:50:35: error: invalid conversion from 'PortGroup*' to 'uint8_t {aka unsigned char}' [-fpermissive]
define digitalPinToPort(P) (&(PORT->Group[g_APinDescription[P].ulPort]))
D:\arduino-1.8.12\libraries\DHT12_sensor_library-master\DHT12.cpp:43:12: note: in expansion of macro 'digitalPinToPort'
D:\arduino-1.8.12\libraries\DHT12_sensor_library-master\DHT12.cpp: In member function 'uint32_t DHT12::expectPulse(bool)':
C:\Users\eric\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.6\variants\nano_33_iot/variant.h:54:41: error: base operand of '->' is not a pointer
define portInputRegister(port) (&(port->IN.reg))
D:\arduino-1.8.12\libraries\DHT12_sensor_library-master\DHT12.cpp:495:11: note: in expansion of macro 'portInputRegister'
while ((*portInputRegister(_port) & _bit) == portState) {
exit status 1 開發板 Arduino NANO 33 IoT 編譯錯誤。 This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.