Hi, I am trying to use the 3 phase sketch on an Emontx. I tried to use PlatformIO using atom, however it failed to load it properly - I kept getting a please restart message. A search of atom and PlatformIO help sections directed me to use Visual studio code, which is supported by platformIO . I downloaded this and have platformIO running. I loaded the 3 phase firmware from guthub and edited as directed in the user guide. One message that comes up with visual studio is that it does not support .ino files and they should be converted to .cpp Is this the correct thing to do. I attempted to compile the sketch as is and it failed. the error log as follows. Can you help please?
> Executing task in folder emontx-3phase-master: C:\Users\Patday\.platformio\penv\Scripts\platformio.exe run <
Warning! `env_default` configuration option in section [platformio] is deprecated and will be removed in the next release! Please use `default_envs` instead
Processing emontx-3phase (platform: atmelavr; framework: arduino; board: uno)
-------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR 2.2.0 > Arduino Uno
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash
DEBUG: Current (simavr) On-board (simavr)
PACKAGES:
- framework-arduino-avr 5.0.0
- toolchain-atmelavr 1.50400.190710 (5.4.0)
Converting src.ino
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:191:0: warning: "VOLTSPIN" redefined
#define VOLTSPIN 0
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:179:0: note: this is the location of the previous definition
#define VOLTSPIN 2
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:192:0: warning: "CT1PIN" redefined
#define CT1PIN 1
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:180:0: note: this is the location of the previous definition
#define CT1PIN 3
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:193:0: warning: "CT2PIN" redefined
#define CT2PIN 2
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:181:0: note: this is the location of the previous definition
#define CT2PIN 0
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:194:0: warning: "CT3PIN" redefined
#define CT3PIN 3
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:182:0: note: this is the location of the previous definition
#define CT3PIN 1
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:196:0: warning: "LEDPIN" redefined
#define LEDPIN 6
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:183:0: note: this is the location of the previous definition
#define LEDPIN 9
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:197:0: warning: "RFMSELPIN" redefined
#define RFMSELPIN 4 // Pins for the RFM Radio module
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:184:0: note: this is the location of the previous definition
#define RFMSELPIN 10
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:198:0: warning: "RFMIRQPIN" redefined
#define RFMIRQPIN 3
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:185:0: note: this is the location of the previous definition
#define RFMIRQPIN 2
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:200:0: warning: "W1PIN" redefined
#define W1PIN 5 // 1-Wire pin for temperature
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:187:0: note: this is the location of the previous definition
#define W1PIN 4 // 1-Wire pin for temperature
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:211:0: warning: "LEDPIN" redefined
#define LEDPIN 9
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:196:0: note: this is the location of the previous definition
#define LEDPIN 6
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:212:0: warning: "RFMSELPIN" redefined
#define RFMSELPIN 5 // See Wiki
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:197:0: note: this is the location of the previous definition
#define RFMSELPIN 4 // Pins for the RFM Radio module
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:215:0: warning: "W1PIN" redefined
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
#define W1PIN 4 // 1-Wire pin for temperature
LDF Modes: Finder ~ chain, Compatibility ~ soft
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:200:0: note: this is the location of the previous definition
Looking for DallasTemperature #define W1PIN 5 // 1-Wire pin for temperature
library in registry
Found: ^
https://platformio.org/lib/show/54/DallasTemperature
LibraryManager: Installing C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:224:0: warning: "LEDPIN" redefined
id=54 @ 3.7.7
#define LEDPIN 6
Using cache: C:\Users\Patday\.platformio\.cache\3e\d36164871f40eedbe43f0e3f85d41a3e
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:211:0: note: this is the location of the previous definition
#define LEDPIN 9
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:225:0: warning: "RFMSELPIN" redefined
#define RFMSELPIN 10 // Pins for the RFM Radio module
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:212:0: note: this is the location of the previous definition
#define RFMSELPIN 5 // See Wiki
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:226:0: warning: "RFMIRQPIN" redefined
#define RFMIRQPIN 2
^
Unpacking [############################--------] 78%
Unpacking [#############################-------] 81%C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:213:0: note: this is the location of the previous definition
Unpacking [##############################------] 84%
Unpacking [###############################-----] 87% #define RFMIRQPIN 3 // See Wiki
Unpacking [################################----] 90%
Unpacking [#################################---] 93% ^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:228:0: warning: "W1PIN" redefined
Unpacking [##################################--] 96% #define W1PIN 5 // 1-Wire pin for temperature
Unpacking [####################################] 100%
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:215:0: note: this is the location of the previous definition
#define W1PIN 4 // 1-Wire pin for temperature
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:243:0: warning: "PHASE2" redefined
#define PHASE2 (NUMSAMPLES/3) // Delay for the Phase 2 voltage
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:240:0: note: this is the location of the previous definition
#define PHASE2 (NUMSAMPLES/6) // Delay for the Phase 2 voltage
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:244:0: warning: "PHASE3" redefined
#define PHASE3 (NUMSAMPLES*2/3) // Delay for the Phase 3 voltage
^
C:/Users/Patday/Downloads/emontx-3phase-master/emontx-3phase-master/src/src.ino:241:0: note: this is the location of the previous definition
#define PHASE3 (NUMSAMPLES/3) // Delay for the Phase 3 voltage
^
DallasTemperature @ 3.7.7 has been successfully installed!
Installing dependencies
Looking for OneWire library in registry
Found: https://platformio.org/lib/show/1/OneWire
LibraryManager: Installing id=1
Using cache: C:\Users\Patday\.platformio\.cache\21\36e4877e55d4cd5b0be34fccc5ff1121
OneWire @ 2.3.5 has been successfully installed!
Looking for JeeLib library in registry
Found: UndefinedPackageVersion: Could not find a version that satisfies the requirement 'c057b5f4c0' for your system 'windows_amd64':
https://platformio.org/lib/show/252/JeeLib File "C:\Users\Patday\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 168:
LibraryManager: Installing env.SConscript("$BUILD_SCRIPT")
id=252 File "C:\Users\Patday\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 597:
@ c057b5f4c0
return _SConscript(self.fs, *files, **subst_kw)
File "C:\Users\Patday\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 286:
exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
File "C:\Users\Patday\.platformio\platforms\atmelavr\builder\main.py", line 161:
target_elf = env.BuildProgram()
File "C:\Users\Patday\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 219:
return self.method(*nargs, **kwargs)
File "C:\Users\Patday\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 62:
env.ProcessProjectDeps()
File "C:\Users\Patday\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 219:
return self.method(*nargs, **kwargs)
File "C:\Users\Patday\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 131:
project_lib_builder = env.ConfigureProjectLibBuilder()
File "C:\Users\Patday\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 219:
return self.method(*nargs, **kwargs)
File "C:\Users\Patday\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 1036:
project.install_dependencies()
File "C:\Users\Patday\.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py", line 868:
lm.install(uri)
File "c:\users\patday\.platformio\penv\lib\site-packages\platformio\managers\lib.py", line 281:
force=force,
File "c:\users\patday\.platformio\penv\lib\site-packages\platformio\managers\package.py", line 704:
pkg_dir = self._install_from_piorepo(name, requirements)
File "c:\users\patday\.platformio\penv\lib\site-packages\platformio\managers\lib.py", line 119:
requirements or "latest", util.get_systype()
======================================================= [FAILED] Took 8.41 seconds =======================================================
Environment Status Duration
-------------------- -------- ------------
emontx-3phase FAILED 00:00:08.411
emontx-3phase_deploy IGNORED
================================================== 1 failed, 0 succeeded in 00:00:08.411 ==================================================
The terminal process "C:\Users\Patday\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1.