08-04-2022, 14:14
Po wprowadzeniu zmiany w programie LCD działa tak samo jak do zmian,
po dodaniu zmodyfikowanego kodu do foldera
mam error:
Arduino: 1.8.13 (Windows 10), Board: "Generic STM32F1 series, BluePill F103C8, STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"
WARNING: library LiquidCrystal_I2C-1.1.2 claims to run on avr architecture(s) and may be incompatible with your current board which runs on stm32 architecture(s).
LCD_forum_3:5:18: error: 'I2C_FAST_MODE' was not declared in this scope; did you mean 'IS_UART_MODE'?
5 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~~~~~~~~~
| IS_UART_MODE
C:\Users\Galinka\Documents\Arduino\LCD_forum_3\modyfied_cpp.ino:7:9: error: redefinition of 'TwoWire Wire2'
7 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~
C:\Users\Galinka\Documents\Arduino\LCD_forum_3\LCD_forum_3.ino:5:9: note: 'TwoWire Wire2' previously declared here
5 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~
C:\Users\Galinka\Documents\Arduino\LCD_forum_3\modyfied_cpp.ino:7:18: error: 'I2C_FAST_MODE' was not declared in this scope; did you mean 'IS_UART_MODE'?
7 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~~~~~~~~~
| IS_UART_MODE
exit status 1
'I2C_FAST_MODE' was not declared in this scope; did you mean 'IS_UART_MODE'?
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Kod:
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}#include <Wire.h>
//#include <LiquidCrystal_I2C.h>
#include "LiquidCrystal_I2C.h" // zmiana
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init();
lcd.backlight();
lcd.print("Hello, world!");
}
void loop() {
// put your main code here, to run repeatedly:
}
po dodaniu zmodyfikowanego kodu do foldera
mam error:
Arduino: 1.8.13 (Windows 10), Board: "Generic STM32F1 series, BluePill F103C8, STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"
WARNING: library LiquidCrystal_I2C-1.1.2 claims to run on avr architecture(s) and may be incompatible with your current board which runs on stm32 architecture(s).
LCD_forum_3:5:18: error: 'I2C_FAST_MODE' was not declared in this scope; did you mean 'IS_UART_MODE'?
5 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~~~~~~~~~
| IS_UART_MODE
C:\Users\Galinka\Documents\Arduino\LCD_forum_3\modyfied_cpp.ino:7:9: error: redefinition of 'TwoWire Wire2'
7 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~
C:\Users\Galinka\Documents\Arduino\LCD_forum_3\LCD_forum_3.ino:5:9: note: 'TwoWire Wire2' previously declared here
5 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~
C:\Users\Galinka\Documents\Arduino\LCD_forum_3\modyfied_cpp.ino:7:18: error: 'I2C_FAST_MODE' was not declared in this scope; did you mean 'IS_UART_MODE'?
7 | TwoWire Wire2 (2,I2C_FAST_MODE);
| ^~~~~~~~~~~~~
| IS_UART_MODE
exit status 1
'I2C_FAST_MODE' was not declared in this scope; did you mean 'IS_UART_MODE'?
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.