Projet :
MCU STM32F103C8 + SX3272 Lora
Plateforme : Atollic + STM32CubeMX
Opération :
Main loop :
• MCU start
• set GPIO_PIN_10 and GPIO_PIN_9 high-> Power instrument
• go to sleep for 250ms
• Wake
• Read AN0 and AN1, store in 12 bit register “WindDir” and “BattPow”
• set GPIO_PIN_10 LOW
• Sleep and wait for 3 interrupts in GPIO_PIN_11 and calculate the average of the two delay between rising edge. Store value in register “WindSpeed”
• Wake after 15 secs if no interrupt occurred and store 0 in “WindSpeed”
• set GPIO_PIN_9 LOW
• Calculate number of interrupt on GPIO_PIN_12, store 1 bits value in register “RainBucket”
•
• Set GPIO_PIN_8 high ->Start LORA SX1272
• go to sleep for 150ms
• Transmit data (“RainBucket”, “WindSpeed”, “WindDir”,”BattPow”) to LORAWAN station with AFK
• Go to deepsleep for 10 min
Any time during this loop all rising edge occurred on the GPIO_PIN_12 must be logged. When the interrupt occurred, temp register must be incremented. When temp register is read to be transferred in “RainBucket” register, it must be cleared.
Will use the “LowCostLoRaGw-master” Git library for SX1272 Lora module. Transfer of data is not encrypted.
Any modification on port or variable name or philosophy of the code will probably be accepted. Just keep me in toutch.
I expect to have the zipped Project folder ready to burn to the blue pill chip.
Want the code working with HAL Driver ready to copy within my Atollic project or preferably, the project developed with Atollic…
Dear Sir, I am an electrical engineer with 18 years experience in this area . I am interested in your project Weather Station
, please send a private chat message.