Struggling to create usermod (platformio newbie)

Hi there, I’m hoping someone can nudge me in the right direction. I’m not a programmer but I play one on TV, so I’m attempting to fabricate my way through this based on existing works, but I’ll be damned if I can figure out the right syntax.

Where the squiggles are, the error is “‘((UsermodStepper*)this)->UsermodStepper::MyStepper’ does not have class type”

I’m using the AccelStepper library. I’ve got this code working on an Arduino Nano via the Arduino IDE, but I’m stuck trying to figure out how to format all this so PlatformIO will compile it.

I’m hoping someone can point me in the right direction – or just tell me what I did wrong, I’m ok with that too!

Thanks in advance.

For those interested, I took this project at Thingiverse and I’m fitting an 8x32 LED matrix to the inside, run (of course) by WLED. This project uses a stepper motor with ULN2003 driver to rotate the lithophane. I wanted to set up a nonblocking rotation that can keep going while WLED is doing its thing too.

You have to instantiate and initialise MyStepper somewhere.

Thanks Blazoncek - don’t know how to do that, I’ve never learned the C language. Done plenty of VB and SQL, just don’t know how this works. I’ll research more. If there’s any chance you can provide an example that might help push me over the edge towards a solution.

Learn from existing usermods. I’ve done a few so take from them.

I’ve been looking through those also. I’ll revisit that. I’m terrible at C so that’s handicapping me.

I sympathize with trying to cobble together a progran in a language one doesn’t know.

In this case though, you are trying to write an object oriented program in C++ (which is not C, although similar to and mostly an expansion of C. C doesn’t have classes, for example.). There are a few concepts which are kind of essential, tho, so you might look for at least an overview which describes classes and instances. You need to define a class (what data and code it has), and then instantiate at least one instance of that class. If those terms don’t mean anything to you, it’s going to be hard to proceed.

You don’t have to become a C++ expert, but you likely will need to understand at least the basics.

Thank you - I started reading through some C++ material as you suggest and will keep at it.