Replies: 1 comment 2 replies
-
Bonjour, oui, voir dans le fichier PIO: il faut utiliser c++ 17 ou plus. ; Arduino 3.0.x
; platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
; Arduino 3.1.x
platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.10-rc3/platform-espressif32.zip
build_flags =
-std=c++17
-std=gnu++17
-Wall -Wextra
build_unflags =
-std=gnu++11 Note: C++ 17 de mémoire est d"office avec Arduino 3.. S'assurer d'utilier Arduino 3. Note: PlatformIO n'est pas compatible Arduino 3 également. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bonjour Mathieu, j'ai essayé ce code pour faire fonctionner le JSY-MK-227 mais il y a une erreur a la compilation sur une librarie, voici l'erreur:
In file included from c:\users\ingrassia alfred\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\shared_mutex:35:0,
from C:\Program Files (x86)\arduino-1.8.19\libraries\MycilaJSY\src/MycilaJSY.h:10,
from C:\Users\Alfred\Documents\Arduino 1.8.19\ESP32_TEST_JSY_MK_227\ESP32_TEST_JSY_MK_227.ino:3:
c:\users\alfred\appdata\local\arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\xtensa-esp32-elf\include\c++\5.2.0\bits\c++14_warning.h:32:2: error: #error This file requires compiler and library support for the forthcoming ISO C++ 2014 standard. This support is currently experimental, and must be enabled with the -std=c++1y or -std=gnu++1y compiler options.
#error This file requires compiler and library support for the forthcoming
^
exit status 1
Erreur de compilation pour la carte DOIT ESP32 DEVKIT V1
D'autre part est ce que ce code est valable ?
Comment connecter le JSY-MK-1031 avec le JSY-MK-227 ?
#include <Arduino.h>
#include <ArduinoJson.h>
#include <MycilaJSY.h>
#define RX2 16
#define TX2 17
Mycila::JSY jsy;
void setup() {
Serial.begin(115200):
jsy.begin(Serial2, RX2, TX2);
}
void loop() {
if(jsy.read()) {
float v = jsy.data.single().voltage;
float i = jsy.data.single().current;
}
Serial.print(v, 1);
Serial.print(" - ");
Serial.println(i, 1);
}
Amicalement, Fred
Beta Was this translation helpful? Give feedback.
All reactions