Closed EG-bit closed 4 years ago
Before flash you should be able to compile...
sketch_nov06a:5:32: error: narrowing conversion of '7' from 'int' to 'bool' [-Wnarrowing]
5 | const bool Relays[] = {R1,R2,R3};
| ^
sketch_nov06a:5:32: error: narrowing conversion of '6' from 'int' to 'bool' [-Wnarrowing]
sketch_nov06a:5:32: error: narrowing conversion of '5' from 'int' to 'bool' [-Wnarrowing]
#define R1 PA8
#define R2 PB10
#define R3 PB4
const uint32_t Relays[] = {R1, R2, R3};
void setup() {
for (int a = 0; a < 3; a++) {
pinMode(Relays[a], OUTPUT);
digitalWrite(Relays[a], 0);
}
digitalWrite(R1, HIGH); //Relay test
}
void loop() {
// put your main code here, to run repeatedly:
}
If it compile, maybe you not used this core.
Hello, sorry for the trouble. I ran into a problem, it is not possible to correctly flash the microcontroller, that is, I configure the outputs and set it to a low state and the PD1 output is always set to the high level. When I set other outputs to the upper level, then nothing changes. When flashing through CubeIDE, everything is correctly stitched. Help please, I'm not good at programming, I'm just learning.
My test code: