Hello everyone. I bought a diycon V2.03 and run an rfm95 on it. a dth22 is also installed. I tried various things to reduce electricity consumption. unfortunately i am not a professional programmer and my english google translate.
I wanted to try that with that
Solution 1:
Setting the SPI and other pins with the following code did the rest:
digitalWrite (PA5, LOW); // SCK
pinMode (PA5, OUTPUT);
digitalWrite (PA7, LOW); // MOSI
pinMode (PA7, OUTPUT);
pinMode (PA6, INPUT_ANALOG); // MISO
digitalWrite (lmic_pins.nss, LOW); // NSS
pinMode (lmic_pins.nss, OUTPUT);
// DIO inputs
pinMode (PA3, INPUT_ANALOG);
pinMode (PB5, INPUT_ANALOG);
pinMode (lmic_pins.rst, INPUT_ANALOG);
// Serial
pinMode (PA9, INPUT_ANALOG);
pinMode (PA10, INPUT_ANALOG);
Problem 1:
Unfortunately I do not find a PA1…PA7 there is always an error when compiling
Unfortunately I don’t know what is meant by rewrapping and pulling up: _ (
Solution 2:
I use Freescale excuse me NXP Kinetis MK20 controllers, which are based on the same Cortex cores as the STM32, together with this excellent library 63 for very satisfying results. The library saves the pin state, then puts all pins to output low and goes to sleep. When it wakes again, pin state is restored and the program continues as if nothing happened. The controller uses around 15µA during sleep.
Problem 2:
There is always an error message here. I saw that it is not an Arduino board: _ /
Could someone help me?