first commit
This commit is contained in:
7
lib/MyClass/library.json
Normal file
7
lib/MyClass/library.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "BlinkLed",
|
||||
"version": "1.0.0",
|
||||
"description": "A simple LED control library with internal LED helper.",
|
||||
"authors": [{ "name": "TiiJay14" }],
|
||||
"frameworks": "arduino"
|
||||
}
|
||||
18
lib/MyClass/src/MyClass.cpp
Normal file
18
lib/MyClass/src/MyClass.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "MyClass.h"
|
||||
|
||||
MyClass::MyClass() : myNum(0), myString("Default")
|
||||
{
|
||||
}
|
||||
|
||||
MyClass::MyClass(int num, const String &str)
|
||||
: myNum(num), myString(str)
|
||||
{
|
||||
}
|
||||
|
||||
void MyClass::display()
|
||||
{
|
||||
Serial.print("Number: ");
|
||||
Serial.print(myNum);
|
||||
Serial.print(", String: ");
|
||||
Serial.println(myString);
|
||||
}
|
||||
16
lib/MyClass/src/MyClass.h
Normal file
16
lib/MyClass/src/MyClass.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef MYCLASS_H
|
||||
#define MYCLASS_H
|
||||
|
||||
#include <Arduino.h> // Required for String type
|
||||
|
||||
class MyClass {
|
||||
public:
|
||||
int myNum;
|
||||
String myString; // Arduino String
|
||||
|
||||
MyClass();
|
||||
MyClass(int num, const String& str);
|
||||
void display();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user