Spark Logic

DHT11/22 Lib on STM32

DHT11 Four-position sensor interface Pinout
STM32F103C8T6 LQFP48 Pinout
AM2302 Four-position sensor interface Pinout

Anyone have done using DHT11DHT11Sensors, encoders and cameras…e<RF24Network.h> #include<SPI.h> #include <DHT.h> #define DHTPIN PC0 #define DHTTYPE DHT11 // DHT 11 #define DHTPIN PC0 DHT dht(DHTPIN, DHTTYPE); // Radio with CE & CSN connected…View in hardware catalog /22 Arduino Lib in STM32duino?
I try to us it in STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog but seems compile passed but not working.
i did move my work to use in Arduino UnoArduino UnoDevelopment and computing boards…ime debugging. konczakp Mon Jul 18, 2016 12:18 pm OK, so I took working example from Arduino UNO . I’ve cut off everything from library that I don’t need and from rest I have crea…View in hardware catalog . Then.. code size more than 32kB.
Thanks.

Replies20

Sun Aug 30, 2015 9:22 pm

Please post a link to the library.

From what I recall, that device has a custom communications protocol, and i suspect as you are running on a 108MHz GD32GD32Microcontrollers and processors…no bootloader and 120MHz clock. RogerClark Mon Feb 22, 2016 8:31 pm I tried to put a GD32 , taken from one board, onto a Maple mini, but my soldering was not good enough, and I ba…View in hardware catalog , that speed may be the problem, i.e you are going too fast.

PS. If you are using the GD32GD32Microcontrollers and processors…no bootloader and 120MHz clock. RogerClark Mon Feb 22, 2016 8:31 pm I tried to put a GD32 , taken from one board, onto a Maple mini, but my soldering was not good enough, and I ba…View in hardware catalog , I presume you read the other thread..
I have mine running ok at 120Mhz

Mon Aug 31, 2015 4:21 am

Hi Roger,
The Lib is from Adafruit/DHT link :-

https://github.com/adafruit/DHT-sensor- … tester.ino

Well, i love speed in GD32GD32Microcontrollers and processors…no bootloader and 120MHz clock. RogerClark Mon Feb 22, 2016 8:31 pm I tried to put a GD32 , taken from one board, onto a Maple mini, but my soldering was not good enough, and I ba…View in hardware catalog but i am not good in Coding. So, i am working in STM32F103C8T6STM32F103C8T6Microcontrollers and processors…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…View in hardware catalog (RED board).

Thanks,

Mon Aug 31, 2015 4:42 am

I doubt that lib would even compile.

It uses a function that is not in the STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog or GD32GD32Microcontrollers and processors…no bootloader and 120MHz clock. RogerClark Mon Feb 22, 2016 8:31 pm I tried to put a GD32 , taken from one board, onto a Maple mini, but my soldering was not good enough, and I ba…View in hardware catalog core

called

microsecondsToClockCycles

I looked in the Due (SAM) core and it has these defines

#define clockCyclesPerMicrosecond() ( SystemCoreClock / 1000000L )
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (SystemCoreClock / 1000L) )
#define microsecondsToClockCycles(a) ( (a) * (SystemCoreClock / 1000000L) )

Fri Sep 18, 2015 1:20 pm

I’ve had a bit of luck getting the adafruit DHT library to compile, (the DHT_U version) which in my opinion is better

Please find the library attatched https://github.com/nullydragon/Adafruit_DHT.

Note.
Line 16 of DHT.cpp has maxcycles hard coded at 72000L which works for my Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog (at 72mhz that should be somewhere in the field of 1-5ms
Line 15 is commented out as there is a type issue (its also redundant with the following change)
Line 240 portInputRegister is passed the output from digitalPinToPort(pin) instead of having it set at the pervious line.

Let me know how it goes.

Sat Sep 26, 2015 2:26 pm

I will try it. Thanks a lot.

Sat Sep 26, 2015 2:56 pm

Line 16 of DHT.cpp has maxcycles hard coded at 72000L which works for my Maple MiniMaple MiniDevelopment and computing boards…8MHz petertumler Thu Sep 24, 2015 10:58 am Hi, I’m trying to underclock a STM32F103 ( Maple Mini ) to 48MHz (for energy efficiency reasons). According to the datasheet .. The full…View in hardware catalog (at 72mhz that should be somewhere in the field of 1-5ms

It may be better to use F_CPU/1000 instead of 72000 as processor clock on some boards is faster e.g GD32GD32Microcontrollers and processors…no bootloader and 120MHz clock. RogerClark Mon Feb 22, 2016 8:31 pm I tried to put a GD32 , taken from one board, onto a Maple mini, but my soldering was not good enough, and I ba…View in hardware catalog is 120Mhz and on F4 the clock frequency can be up to 180Mhz I think

Sat Sep 26, 2015 3:07 pm

RogerClark wrote:on F4 the clock frequency can be up to 180Mhz I think

Sat Sep 26, 2015 3:12 pm

Hi Martin

I thought there was a 180Mhz variant. I only have the 168Mhz F4 Discovery board, but I thought there was a faster one.

Anyway, the main reason for using F_CPU is that the GD32F1GD32F1Microcontrollers and processors… in the wrong direction is the platform.txt file. its Arduino\hardware\Arduino_STM32\ GD32F1 \platform.txt However I took a quick look and I can’t see anyhing in there that looks…View in hardware catalog runs at 96Mhz in stable operation, or 120Mhz in overclocked (without any issues) but also some people want to run the STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog at 48Mhz to save power.

I personally dont like hard coded arbitrary values, especially ones that are a derivative of the clock freq.

I recently did a load of tidying up of the STM32F103STM32F103Microcontrollers and processors…19.html . ag123 Sat Apr 28, 2018 5:54 pm come to think of it blue pill / maple mini ( stm32f103 ) is an *ideal* keyboard controller, the scanning can be done with assistance of sh…View in hardware catalog after I’d done work on the GD32GD32Microcontrollers and processors…no bootloader and 120MHz clock. RogerClark Mon Feb 22, 2016 8:31 pm I tried to put a GD32 , taken from one board, onto a Maple mini, but my soldering was not good enough, and I ba…View in hardware catalog core, to try to remove some of the same sort of hard coded values.
There may still be a few references to 72000000 or 72 or 72000 but I think I have replaced most of them with F_CPU derivatives ;-)

Mon Oct 12, 2015 6:56 am

I’ve updated to use F_CPU, I’ve not had a chance to test yet though.

Thu May 12, 2016 1:54 pm

I am a newer to arduino STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog .
I have some error message, when I build the DHTtester.

—————————————————————————————————————————————————-
C:\Users\booker\AppData\Roaming\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -MMD -ffunction-sections -fdata-sections -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_STM32F103CSTM32F103CMicrocontrollers and processors…doesnt work” mortenholm Fri Jul 24, 2015 10:05 pm Sure. I have selected the ‘Generic STM32F103C series’ and i have tried both the 64k and 128k versions (stm32flash reports 128k).…View in hardware catalog -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -mcpu=Cortex-M3Cortex-M3Microcontrollers and processors…get this error arm-none-eabi-g++: error: unrecognized command line option '-CC -mcpu= cortex-m3 ' RogerClark Sun May 15, 2016 6:25 am Fixed it @vassilis do a pull from my repo to…View in hardware catalog -DF_CPU=72000000L -DARDUINO=10605 -DARDUINO_GENERIC_STM32F103CSTM32F103CMicrocontrollers and processors…doesnt work” mortenholm Fri Jul 24, 2015 10:05 pm Sure. I have selected the ‘Generic STM32F103C series’ and i have tried both the 64k and 128k versions (stm32flash reports 128k).…View in hardware catalog -DARDUINO_ARCH_STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog -DCONFIG_MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog _MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8STM32F103C8Microcontrollers and processors…017 8:28 am I am trying to get Phono’s library working on a MCP2551 and a blue pill ( STM32F103C8 ), I have it connected to a active CANBUS, and I have successfully received and s…View in hardware catalog -mthumb -march=armv7-m -D__STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog __ -DMCU_STM32F103C8STM32F103C8Microcontrollers and processors…017 8:28 am I am trying to get Phono’s library working on a MCP2551 and a blue pill ( STM32F103C8 ), I have it connected to a active CANBUS, and I have successfully received and s…View in hardware catalog -mthumb -march=armv7-m -D__STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog __ -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/include -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog /include -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/usb/STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/usb/usb_lib -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \cores\MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \variants\generic_STM32F103CSTM32F103CMicrocontrollers and processors…doesnt work” mortenholm Fri Jul 24, 2015 10:05 pm Sure. I have selected the ‘Generic STM32F103C series’ and i have tried both the 64k and 128k versions (stm32flash reports 128k).…View in hardware catalog -IC:\Users\booker\Documents\Arduino\libraries\DHT-sensor-library-master r:\TEMP\build3874439298577829562.tmp\DHTtester.cpp -o r:\TEMP\build3874439298577829562.tmp\DHTtester.cpp.o
C:\Users\booker\AppData\Roaming\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -MMD -ffunction-sections -fdata-sections -nostdlib –param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_STM32F103CSTM32F103CMicrocontrollers and processors…doesnt work” mortenholm Fri Jul 24, 2015 10:05 pm Sure. I have selected the ‘Generic STM32F103C series’ and i have tried both the 64k and 128k versions (stm32flash reports 128k).…View in hardware catalog -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -mcpu=Cortex-M3Cortex-M3Microcontrollers and processors…get this error arm-none-eabi-g++: error: unrecognized command line option '-CC -mcpu= cortex-m3 ' RogerClark Sun May 15, 2016 6:25 am Fixed it @vassilis do a pull from my repo to…View in hardware catalog -DF_CPU=72000000L -DARDUINO=10605 -DARDUINO_GENERIC_STM32F103CSTM32F103CMicrocontrollers and processors…doesnt work” mortenholm Fri Jul 24, 2015 10:05 pm Sure. I have selected the ‘Generic STM32F103C series’ and i have tried both the 64k and 128k versions (stm32flash reports 128k).…View in hardware catalog -DARDUINO_ARCH_STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog -DCONFIG_MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog _MINI_NO_DISABLE_DEBUG=1 -DSERIAL_USB -DGENERIC_BOOTLOADER -DMCU_STM32F103C8STM32F103C8Microcontrollers and processors…017 8:28 am I am trying to get Phono’s library working on a MCP2551 and a blue pill ( STM32F103C8 ), I have it connected to a active CANBUS, and I have successfully received and s…View in hardware catalog -mthumb -march=armv7-m -D__STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog __ -DMCU_STM32F103C8STM32F103C8Microcontrollers and processors…017 8:28 am I am trying to get Phono’s library working on a MCP2551 and a blue pill ( STM32F103C8 ), I have it connected to a active CANBUS, and I have successfully received and s…View in hardware catalog -mthumb -march=armv7-m -D__STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog __ -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/include -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog /include -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/usb/STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \system/libmaple/usb/usb_lib -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \cores\MapleMapleDevelopment and computing boards…expensive short of buying in bulk. many resort to usb-serial converters. today comes leaflabs maple , stm32duino it is ‘disruptive’ in a similar light, user customizable usb is no…View in hardware catalog -IC:\Users\booker\Documents\Arduino\hardware\Arduino_STM32STM32Microcontrollers and processors…Map magic glue code, ethernet compiles, just WARNING: library LwIP claims to run on [ stm32 ] architecture(s) and may be incompatible with your current board which runs on [STM32]…View in hardware catalog -master\STM32F1STM32F1Microcontrollers and processors…w I am not able to compile. Error message: “C:\arduino-1.6.12\hardware\Arduino_STM32\ STM32F1 \cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory” I…View in hardware catalog \variants\generic_STM32F103CSTM32F103CMicrocontrollers and processors…doesnt work” mortenholm Fri Jul 24, 2015 10:05 pm Sure. I have selected the ‘Generic STM32F103C series’ and i have tried both the 64k and 128k versions (stm32flash reports 128k).…View in hardware catalog -IC:\Users\booker\Documents\Arduino\libraries\DHT-sensor-library-master -IC:\Users\booker\Documents\Arduino\libraries\DHT-sensor-library-master\utility C:\Users\booker\Documents\Arduino\libraries\DHT-sensor-library-master\DHT.cpp -o r:\TEMP\build3874439298577829562.tmp\DHT sensor library\DHT.cpp.o
C:\Users\booker\Documents\Arduino\libraries\DHT-sensor-library-master\DHT.cpp: In constructor ‘DHT::DHT(uint8_t, uint8_t, uint8_t)’:
C:\Users\booker\Documents\Arduino\libraries\DHT-sensor-library-master\DHT.cpp:18:46: error: ‘microsecondsToClockCycles’ was not declared in this scope
_maxcycles = microsecondsToClockCycles(1000); // 1 millisecond timeout for
^
Error compiling.
———————————

I don’t know why ? I find the library attatched https://github.com/nullydragon/Adafruit_DHT.

Thu May 12, 2016 7:34 pm

we may now be able to add those functions to the core, as I think we define FCPU for all processors.

However, I dont know if the library would work even if that function was added, because I am not entirely sure how the code is going to be able to count processor cycles.

LOL.

as far as I can tell, that function is only used for debugging

try just commenting out that line.

Thu May 12, 2016 8:21 pm

I’ve just added the missing function and 2 other associated functions to the F1 & F4 cores
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
#define clockCyclesToMicroseconds(a) ( ((a) * 1000L) / (F_CPU / 1000L) )
#define microsecondsToClockCycles(a) ( (a) * (F_CPU / 1000000L) )

Sun May 15, 2016 4:42 pm

just checked that DHT22DHT22Sensors, encoders and cameras…s(a) ( (a) * (F_CPU / 1000000L) ) zmemw16 Sun May 15, 2016 4:42 pm just checked that DHT22 library works out of the box with Baite Maple Mini this is header of the DHT.cpp /******…View in hardware catalog library works out of the box with Baite Maple MiniBaite Maple MiniDevelopment and computing boards…fu-util: No DFU capable USB device available simonf Sun Jul 31, 2016 3:26 pm Is it a baite maple mini ? Which bootloader did you select in the IDE? Origonal or Maple Mini. Did you…View in hardware catalog

this is header of the DHT.cpp

/******************************************************************
DHT Temperature & Humidity Sensor library for Arduino.

Features:

  • Support for DHT11DHT11Sensors, encoders and cameras…e<RF24Network.h> #include<SPI.h> #include <DHT.h> #define DHTPIN PC0 #define DHTTYPE DHT11 // DHT 11 #define DHTPIN PC0 DHT dht(DHTPIN, DHTTYPE); // Radio with CE & CSN connected…View in hardware catalog and DHT22DHT22Sensors, encoders and cameras…s(a) ( (a) * (F_CPU / 1000000L) ) zmemw16 Sun May 15, 2016 4:42 pm just checked that DHT22 library works out of the box with Baite Maple Mini this is header of the DHT.cpp /******…View in hardware catalog /AM2302AM2302Sensors, encoders and cameras…ature & Humidity Sensor library for Arduino. Features: - Support for DHT11 and DHT22/ AM2302 /RHT03 - Auto detect sensor model - Very low memory footprint - Very small code Writte…View in hardware catalog /RHT03RHT03Sensors, encoders and cameras… Humidity Sensor library for Arduino. Features: - Support for DHT11 and DHT22/AM2302/ RHT03 - Auto detect sensor model - Very low memory footprint - Very small code Written by Mar…View in hardware catalog
  • Auto detect sensor model
  • Very low memory footprint
  • Very small code

http://www.github.com/markruys/arduino-DHT

Written by Mark Ruys, [email protected].

BSD license, check license.txt for more information.
All text above must be included in any redistribution.

Datasheets:

  • http://www.micro4you.com/files/sensor/DHT11DHT11Sensors, encoders and cameras…e<RF24Network.h> #include<SPI.h> #include <DHT.h> #define DHTPIN PC0 #define DHTTYPE DHT11 // DHT 11 #define DHTPIN PC0 DHT dht(DHTPIN, DHTTYPE); // Radio with CE & CSN connected…View in hardware catalog .pdf
  • http://www.adafruit.com/datasheets/DHT22DHT22Sensors, encoders and cameras…s(a) ( (a) * (F_CPU / 1000000L) ) zmemw16 Sun May 15, 2016 4:42 pm just checked that DHT22 library works out of the box with Baite Maple Mini this is header of the DHT.cpp /******…View in hardware catalog .pdf
  • http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Weather/RHT03RHT03Sensors, encoders and cameras… Humidity Sensor library for Arduino. Features: - Support for DHT11 and DHT22/AM2302/ RHT03 - Auto detect sensor model - Very low memory footprint - Very small code Written by Mar…View in hardware catalog .pdf
  • http://meteobox.tk/files/AM2302AM2302Sensors, encoders and cameras…ature & Humidity Sensor library for Arduino. Features: - Support for DHT11 and DHT22/ AM2302 /RHT03 - Auto detect sensor model - Very low memory footprint - Very small code Writte…View in hardware catalog .pdf

Changelog:
2013-06-10: Initial version
2013-06-12: Refactored code
2013-07-01: Add a resetTimer method
******************************************************************/

Thu Oct 20, 2016 6:37 am

Hi,

For my DHT22DHT22Sensors, encoders and cameras…s(a) ( (a) * (F_CPU / 1000000L) ) zmemw16 Sun May 15, 2016 4:42 pm just checked that DHT22 library works out of the box with Baite Maple Mini this is header of the DHT.cpp /******…View in hardware catalog , this lib from Mark Ruys at http://www.github.com/markruys/arduino-DHT was giving only temperature, but humidity was far off.

I like this lib as as advertised, it is very small, and i would add very reliable IME.

The issue was in the different size of “word” type between AVRAVRMicrocontrollers and processors…Arduino\libraries\U8glib\U8glib.cpp, C:\Program Files (x86)\Arduino\hardware\arduino\ avr \cores\arduino\HardwareSerial.h, C:\Program Files (x86)\Arduino/Blink3.ino, D:\Users\me\A…View in hardware catalog and arm. Changing it to explicit type “uint16_t” solved the issue.

I contacted the author who updated his repo. So current version works out of the box, thanks all !

Thu Oct 20, 2016 7:08 am

ozolive wrote:

I contacted the author who updated his repo. So current version works out of the box, thanks all !

Thu Nov 10, 2016 1:24 pm

Hi!
I have STM32F103C8T6STM32F103C8T6Microcontrollers and processors…e Sep 27, 2016 10:28 pm I know this is an old topic, but… I’m using blue pill board ( STM32F103C8T6 , version 3). With the current (modified) Adafruit library 0.96″ OLED display w…View in hardware catalog blue chineese board and flashed it with stm32duino.
Then, I’ve downloaded that library ozolive wrote:from Mark Ruys at http://www.github.com/markruys/arduino-DHT

Thu Nov 10, 2016 6:13 pm

Something went wrong. Now the board flashes LED 3 times a second and is seen only as “mapple DFU” device, not as serial port :( any ideas? How to load any program via USB-UART converter?

Thu Nov 10, 2016 6:59 pm

If you don’t know something, it is always helpful to read the wiki.

Thu Nov 10, 2016 7:07 pm

And_Ru wrote:Hi!
I could not use pin number “PC13”, because it is not uint_8 type.

Post a reply

Optional · up to 10 MiB