Skip to main content

Questions tagged [cpp]

Filter by
Sorted by
Tagged with
1 vote
0 answers
77 views

I am working on a code for ESP boards that can be used on either ESP32 or ESP8266 and I want to make sure I include the correct libraries. I know I can check if ESP32 OR ESP8266 are defined, but I ...
SagiZiv's user avatar
  • 201
0 votes
1 answer
213 views

I have to simulate an ADC that behaves as an I2C slave. The simulated values that the ADC shall expose are sent over serial, saved on an attribute and are requested by a master device over I2C. A ...
lumaca96's user avatar
5 votes
1 answer
924 views

I'm currently facing an issue using delay() and millis() functions in an external cpp file. The issue is that when I used delay() in my main program (meaning .ino file) it works well but when I call ...
Cyril_Ram's user avatar
0 votes
1 answer
85 views

I want to specify a function with parameters for a function parameter, but it doesn't come together. //////////////////////////////////////////////////////////////////////// // Example funch... void ...
CloverField's user avatar
0 votes
2 answers
972 views

For a specific project, I need to convert an int to a const int variable type. int i = 10; boolean ShiftRegister[i] //Throws error const int i = 10; boolean ShiftRegister[i]// Works Fine as i am ...
Subha Jeet Sikdar's user avatar
0 votes
1 answer
188 views

I took a simple A2320 temperature sensor and connected it not to A4/A5, but to A1/A0 pins. SDA => A1, SCL => A0. (In C code they are number 15 and 14). But I can't call the library to take ...
user avatar
0 votes
1 answer
677 views

I know this question has been asked a thousand times, but I can't find a solution for my case. I what to get the length of a string array in a given function. This is for an arduino board. #define LEN(...
will.mendil's user avatar
0 votes
1 answer
78 views

Here is code I have written: #include <stdio.h> #include <ESP8266WebServer.h> #define MAX_WIFI_INIT_RETRY 50 #define WIFI_RETRY_DELAY 500 const char* wifi_ssid = "ssid"; const char* ...
Ciasto piekarz's user avatar
0 votes
1 answer
108 views

#include "connection.h" void setup() { Serial.begin(115200); Funcs::Connect conn; conn.connectWifi(); } void loop() { } then connection.h file: // connection.h namespace Funcs { class ...
Ciasto piekarz's user avatar
1 vote
1 answer
85 views

I want to refactor this code /* YF‐ S201 Water Flow Sensor Water Flow Sensor output processed to read in litres/hour Adaptation Courtesy: www.hobbytronics.co.uk */ volatile int flow_frequency; // ...
Valanthor's user avatar
0 votes
2 answers
1k views

I've created a simple sketch for an esp32 that hosts a REST API that can be accessed via HTTP. Based on the instructions received from the client, the esp32 controls some neopixels with some various ...
shadowkrazee's user avatar
1 vote
1 answer
8k views

I am adding Dust Sensor to my particle photon project at home, I got this GitHub project that I want to test before implementing a final code. I am not an expert in cpp, I wanted to modularise the ...
Ciasto piekarz's user avatar
0 votes
1 answer
184 views

Im a student and working on a arduino project for IoT competition and me and my team have built a house and I made this code below. For some reason when I upload it to my Arduino MKR1000 it constantly ...
mike6715b's user avatar
  • 103