The interval time is 1000ms,.
but after I upload the program, the interval between the two colors is about 2000ms.
This is much slower than in my code.
Code: Select all
#include "Arduino.h"
int red = 0;
int green = 1;
int blue = 2;
void setup()
{
pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(blue, OUTPUT);
}
void loop()
{
digitalWrite(red, LOW);
delay(1000);
digitalWrite(red, HIGH);
digitalWrite(green, LOW);
delay(1000);
digitalWrite(green, HIGH);
digitalWrite(blue, LOW);
delay(1000);
digitalWrite(blue, HIGH);
}
Code: Select all
Processing blackpill_f401cc (platform: ststm32; board: blackpill_f401cc; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/blackpill_f401cc.html
PLATFORM: ST STM32 (12.0.0) > BlackPill F401CC
HARDWARE: STM32F401CCU6 84MHz, 64KB RAM, 256KB Flash
DEBUG: Current (blackmagic) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:
- framework-arduinoststm32 4.10900.200819 (1.9.0)
- framework-cmsis 2.50501.200527 (5.5.1)
- toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 18 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/blackpill_f401cc/src/main.cpp.o
Linking .pio/build/blackpill_f401cc/firmware.elf
Building .pio/build/blackpill_f401cc/firmware.bin
Checking size .pio/build/blackpill_f401cc/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 1.4% (used 892 bytes from 65536 bytes)
Flash: [ ] 4.1% (used 10876 bytes from 262144 bytes)