Up To Date Tutorial for Libraries/Classes in the Web Editor?

Hello!

I just got an Arduino Uno and started messing around in the web editor. I'm having a heck of a time trying to write my first (extremely simple) class, partially because every tutorial I follow seems to turn out to be outdated.

I really just want to create a class within the sketch, but since apparently that can't be done (?), I've created a library, which when included in my sketch refuses to recognize my methods

class 'Timer' has no member named 'check'

Anyway, are there any tutorials that are up to date for writing classes/libraries in the web editor?

You can create a class above your sketch in the same .ino file.

kinda' like this..

#include things.h


class myClass {

methodA()
other stuff

};


myClass:: methodA() {

}


setup() {

}


loop() {

}

-jim lee

Thank you, Jim. I eventually got it working. For anyone who has a similar issue, I was following this tutorial: https://www.radishlogic.com/arduino/use-c-class-arduino-ide-without-creating-library/

I'm sure there's a reason for this, but the author doesn't do

myClass:: methodA() {

}

which I think was my original problem. So yeah, be sure to do that and be sure to put the class at the top of the sketch.