Ok, I didn't think this way yet. Thank you.
Do you know how I could implement it in the circuit?
Or which parts I could use, so I can inform myself about these parts.
Search found 9 matches
- Mon Mar 02, 2020 12:12 pm
- Forum: Hardware Projects
- Topic: plant watering
- Replies: 41
- Views: 183394
- Fri Feb 28, 2020 12:44 pm
- Forum: Other Boards
- Topic: STM32F405RG Hardware timer period to 6h
- Replies: 12
- Views: 7979
Re: STM32F405RG Hardware timer period to 6h
My project is a box with regulated temperature and humidity. I'm using a Dht22 as sensor, a heat mat to heat, fans to cool and a humidifier for humidity regulation. Also I need an air exchange every six hour, that's what this topic was about. My code works so far. But now I added deepsleep in betwee...
- Wed Feb 26, 2020 3:40 pm
- Forum: Hardware Projects
- Topic: plant watering
- Replies: 41
- Views: 183394
Re: plant watering
Also consider the hardware incidents. If you run out of water, the pump will be turned on after each reading. Thus, your sleep command at the end of the pump could be critical to make sure, the pump has time to cool down and does not overheat. Same is true if the water never reaches the sensor, etc...
- Mon Feb 24, 2020 5:58 pm
- Forum: Other Boards
- Topic: STM32F405RG Hardware timer period to 6h
- Replies: 12
- Views: 7979
Re: STM32F405RG Hardware timer period to 6h
I flashed some Images, and the one for the handmade PYB v3 works well so far. edit: The order of the onboard LEDs is set different, the rest works fine. Now I can also use the software Timer, and even the dht module. Updating was a good advice. MicroPython v1.12-195-gb16990425 on 2020-02-24; PYBv3 w...
- Sun Feb 23, 2020 6:24 pm
- Forum: Other Boards
- Topic: STM32F405RG Hardware timer period to 6h
- Replies: 12
- Views: 7979
Re: STM32F405RG Hardware timer period to 6h
You are right.
I thought it is only a small inaccuracy, but multiplying it with the period the mistake grows.
I thought it is only a small inaccuracy, but multiplying it with the period the mistake grows.
- Sun Feb 23, 2020 4:23 pm
- Forum: Other Boards
- Topic: STM32F405RG Hardware timer period to 6h
- Replies: 12
- Views: 7979
Re: STM32F405RG Hardware timer period to 6h
Thanks again for solving my problem. Also, looking at http://docs.micropython.org/en/latest/l ... ight=timer, you might better use timer 2 or 5, since these are not limited to 16 bit. Having a second look at the documentation, I see what you are referring to. I did not know the notation for the defi...
- Sun Feb 23, 2020 3:10 pm
- Forum: Other Boards
- Topic: STM32F405RG Hardware timer period to 6h
- Replies: 12
- Views: 7979
Re: STM32F405RG Hardware timer period to 6h
Thanks, this solved my problem. Altough using freq to initialise the timer is not accurrate. I used prescaler and period instead. >>>timer2=pyb.Timer(2) >>> timer2.source_freq() 84000000 >>> timer2.init(freq=1/(6*60*60),callback=my_callback) >>> timer2 Timer(2, freq=0, prescaler=9999, period=1814399...
- Sun Feb 23, 2020 2:44 pm
- Forum: Other Boards
- Topic: STM32F405RG Hardware timer period to 6h
- Replies: 12
- Views: 7979
Re: STM32F405RG Hardware timer period to 6h
Thanks for the answer. My board seems to have a different module structure and different attributes. My Timer module is under pyb.Timer and it does not support a PERIODIC mode, therefore I use the UP mode. Also the tick_hz attribut is not supported. >>> dir(machine) ['__name__', 'info', 'unique_id',...
- Sun Feb 23, 2020 12:25 pm
- Forum: Other Boards
- Topic: STM32F405RG Hardware timer period to 6h
- Replies: 12
- Views: 7979
STM32F405RG Hardware timer period to 6h
Hello, Im using a STM32F405RG board from Aliexpress. I set up a hardware timer with a callback function in the REPL. And it works for timer.freq(1) to run the callback function every second. But I need a callback every six hours. If I call timer.freq(1/(60*60*6)), it sets the freq:=0 and manipulates...