Skip to main content

Questions tagged [class]

A custom structure in C++ (and various other languages) which can contain member data and functions. An instance of a class is called an object.

0 votes
0 answers
147 views

I'm using the Arduino IDE (v1.8.19) with the Earle Philhower core to program a Raspberry Pi Pico (RP2040) board. I2C bus 0 of the Pico (pins 4 (SDA) and 5 (SCL) are coupled to a first MCP23017 port ...
Malzon's user avatar
  • 1
-1 votes
1 answer
113 views

I'm experimenting with classes in Arduino code. I have the following small code snippet: #include "Motor.h" #include "Arduino.h" Motor::Motor() { } void Motor::Configure(...
starship15's user avatar
3 votes
2 answers
3k views

I intended to use a timer interrupt for limited instances of a class in my ESP32 Arduino project. My first code conception was as follows: portEXIT_CRITICAL_ISR(&lock0); } ...
Hamid s k's user avatar
  • 143
1 vote
1 answer
3k views

In order to explain my problem I used 3 classes: Actions, Triggers, and Combine. Actions simulates an action function, that is defined externally. Triggers has that function that needed to be executed....
guyd's user avatar
  • 1,049
1 vote
4 answers
1k views

I have a class with 12 instances of a button, to create a keypad( meaning that this is the only case I use 12 instances). But this class can be just a button array of any other number between 1-12. I'...
guyd's user avatar
  • 1,049
1 vote
2 answers
2k views

I am new to C++ & I need to call functions of one class from another class. And so that the classes do not know anything about each other. How to do it in Arduino environment? class Encoder { ...
Andre's user avatar
  • 27
1 vote
0 answers
305 views

I'm trying to use a library function in my ISR function that uses the internal timer to trigger every 1 ms. The chip that I'm using is an ESP32-C3-MINI. Here is my current code: main.cpp #include <...
Max's user avatar
  • 111
-1 votes
1 answer
364 views

I'm trying to creaper class wraper to use an Streamobject but I've an error when I try to compile. My .hfile : #include <Arduino.h> class TestSerialListener { public: TestSerialListener(...
simon's user avatar
  • 133
2 votes
1 answer
135 views

I am trying to create a class (Arm) that controls an arm. The arms have 2 motors, each with an encoder, so I pass 4 integers for the pins and I am trying to pass 2 pointers (one for each encoder ...
EricWeissman's user avatar
1 vote
1 answer
152 views

I want to write a class for a model bike. For controlling the steering I use a DC motor with two encoders. To get the steering angle stAng of the bike, I attach a interrupt to the pin ST_ENC_A where ...
Ole's user avatar
  • 13
22 votes
5 answers
79k views

C on embedded systems has traditionally use structs to hold structured data. Arduino brings C++ to the table, so we can use classes instead. Lets say we have two different data structures which ...
Cybergibbons's user avatar
  • 5,430
1 vote
1 answer
96 views

I'm having troubles understanding the inner workings of classes and such. I have a class called Attributes that contains parameters. In my .ino, I can simply instantiate an object with Attributes ...
AJ_Smoothie's user avatar
1 vote
1 answer
638 views

I created a class for TFT buttons and messages when using a Wemos 2.4 tft touch display. In a code I use about 12 buttons (3 different screens with 4 buttons in each screen ), for example in my home ...
guyd's user avatar
  • 1,049
21 votes
3 answers
9k views

I have no previous experience with C++ or C, but know how to program C# and am learning Arduino. I just want to organize my sketches and am quite comfortable with the Arduino language even with its ...
heltonbiker's user avatar
0 votes
2 answers
1k views

I'm working on an led matrix project where I'm running a series of patterns made of bitmap frames. Here's an example: https://vimeo.com/564184465 Right now I'm using a series of method calls named per ...
Chris Schmitz's user avatar

15 30 50 per page
1
2 3 4 5
9