Convert Arduino cod...
 
Notifications
Clear all

Convert Arduino code into ESP Easy Mega plugin for ESP8266 / ESP32


christophe
Posts: 253
Admin
Topic starter
(@chris)
Member
Joined: 5 years ago
wpf-cross-image

How to turn Arduino code into ESP Easy Mega plugin for ESP8266 / ESP32. Example with AMG8833 thermal camera 64 pixels

5 Replies
411748126304fe1b593c01ceed77e8c9?s=80&d=mm&r=g
Posts: 2
 Gregoris Tsintaris
Guest
(@Gregoris Tsintaris)
Joined: 5 months ago

Tried to follow the tutorial but the define_plugin_sets.h is not in the src folder instead it is in srcsrcCustomBuild . I added the plugin to the list but during compilation I didn't see it being used.... Is there something changed? What can I do to include it?

Reply
2 Replies
christophe
Admin
(@chris)
Joined: 5 years ago

Member
Posts: 253

Hello Gregoris. Are you using the Arduino or PlatformIO IDE to develop?

Reply
411748126304fe1b593c01ceed77e8c9?s=80&d=mm&r=g
 Gregoris Tsintaris
Guest
(@Gregoris Tsintaris)
Joined: 5 months ago

Posts: 2

I use PlatformIO through VSCode

Reply
697bbcc9bfbd56ec599e9218c2f2b287?s=80&d=mm&r=g
Posts: 1
 Mohammad Khaled
Guest
(@Mohammad Khaled)
Joined: 5 months ago

Hi, I am using PlatforIO (on VSCode) to build. I am trying to write a custom plugin for a stepper motor, which currently does not exist in ESPEasy. Even though you recommend to have a working code first before building it, writing a code for a stepper motor is fairly simple. My struggle is learning how to write the custom plugin, follow necessary procedures and have a working firmware with my custom plugin.
Currently I am getting errors on platformIO when I try to build which I am unable to even comprehend. I was wondering if anyone could help me?

Reply
697bbcc9bfbd56ec599e9218c2f2b287?s=80&d=mm&r=g
Posts: 1
(@mkhaled)
New Member
Joined: 5 months ago

Hello, I am trying to write a custom plugin for a stepper motor (which does not exist in ESPEasy). I am using PlatformIO (VSCode). I will eventually flash the new firmware on my nodeMCU (esp8266) in order to control a stepper motor via openHAB [mqtt + Mosquitto] - all of which are already running on a Raspberry Pi.
These are my steps:
Added the AccelStepper library inside this folder: ESPEasy\lib
Put my plugin file "_P555_stepper.ino" here: ESPEasy-mega\src
In the file __Plugin.ino, I added these lines:
//custom plugin - stepper - mkhaled
#ifdef PLUGIN_555
ADDPLUGIN(555)
#endif

In the file called "define_plugin_sets.h" at this location: C:\Users\Mkhaled\Downloads\ESPEasy-mega\src\src\CustomBuild
I added this: #define USES_P555 //stepper plugin

When I try to build the ESP-MEGA project folder with my plugin in it, it throws a lot of errors. Could someone please help? I have hit a dead-end and unable to proceed. On the attached file I have copied the errors that comes up when I try to build on platformIO. Once I have figured out the process of build + flash new firmware, I'll adapt my plugin code for stepper motor control.

Reply
Share:
Join Us!
Recent Posts
Last Articles
DIY Projects
DIY Projects