Questions tagged [library]

A library is a file that can be included into the code to add new instructions by combining many existing instructions and creating one easy to use instruction to call.

Filter by
Sorted by
Tagged with
0
votes
1answer
10 views

Can't get keypad to use Keyboard.write on an Arduino Uno

I've tried to use Keypad.h and Keyboard.h libraries to get my Arduino to use my Keypad for Keyboard input. I'll start with working keypad code (which is pretty easy but it's my first post so I want ...
0
votes
1answer
32 views

How to change wifi credentials of multiple ESP8266 together

I need to change WiFi credentials of multiple ESP8266 in one go, without needing to change passwords for each of them individually. I know there is a WiFiManager library, which makes your ESP8266 ...
0
votes
1answer
41 views

Keep 5V on while sleep with LowPower library

Is it possible to keep the 5V on, while putting the Arduino (ATMEGA328P) in sleep more, using LowPower library? I'm trying to use this HAT: https://spellfoundry.com/product/sleepy-pi-2-usb-c/ to ...
0
votes
1answer
36 views

Passing a NeoPixel object reference to a custom library

I'm new to Arduino programming and haven't programmed in C++ in the past. I'm trying to create a custom library to cycle a rainbow on my NeoPixel LED strip. I want to pass a reference or pointer or ...
0
votes
0answers
24 views

Arduino pro mini and SIM800L problem with GPRS

I'm trying to create a datalogger that sends data to a server at a certain time. I use SIM800L and Arduino pro mini. Wiring: SIM800L Arduino mini pro RST 7 TX 8 RX 9 ...
0
votes
0answers
27 views

Arduino-compatible Bluetooth classic module to use in a product

I've been designing a product for some time using arduino language, but on our own hardware. Recently a need arose to add some Bluetooth capability to our product. We decided to use BT classic instead ...
0
votes
0answers
20 views

Using SMS to send commands to the Arduino. Having problems in data parsing

I'm still inexperienced in programming and i apologize in advance if my mistakes are stupidly obvious. This sketch I'm working on is a basic GSM project using SIM900a Mini and an Arduino UNO that ...
0
votes
2answers
72 views

displaying a 3 digit clock time on a 4 digit 7 segment display

I purchased one of these 4 digit 7 segment displays using a TM1637. I installed the TM1637 display library from the libraries manager and included it: (#include <TM1637Display.h>). I am ...
0
votes
1answer
117 views

ESP8266 compilation error: “previous declaration of 'HTTPMethod HTTP_HEAD'”

I have an ESP8266 program that used to work but is now failing to compile with this error: C:\...\Arduino\libraries\WiFiManager/WiFiManager.h:25:24: note: in expansion of macro 'PROGMEM' const ...
0
votes
1answer
69 views

Error compiling for Arduino Nano 33 BLE with LiquidCrystal library

I recently started coding in the Arduino IDE for the Arduino Nano 33 BLE I bought. When I choose the Nano 33 BLE as my board, I get the following Error: Arduino: 1.8.11 (Windows 10), Board: "Arduino ...
0
votes
1answer
41 views

IDE finds multiple libraries

I don't understand Arudino IDE. Ever. This is a part of the compilation output: Alternatives for ArduinoJson.h: [ArduinoJson@6.14.0] ResolveLibrary(ArduinoJson.h) -> candidates: [ArduinoJson@6....
0
votes
1answer
31 views

How to declare a pointer for arduino neopixels library so I can set it up in the setup function with dynamic variables?

I am using NeoPixel strips, and I want to be able to declare a pointer to them, but not initialize them until the setup function (because they will initialize with certain variables only made ...
0
votes
1answer
82 views

How to control segments with SevSeg library

The SevSeg library by Dean Reading seems to have a keyword to control individual segments on SSD's. I am using four common cathode, single digit displays. Does anyone know how to program individual ...
5
votes
1answer
426 views

Recommended way to fork a library

I want to extend a library, available on github to add some features I need. Of course I will made available the new source code as well. Because it's the first time I do this, I'm not sure how to do. ...
0
votes
1answer
46 views

How should I customize UIPEthernet constants?

I am using UIPEthernet to get an Arduino Nano to drive an ENC28J60 Ethernet Shield for a UDP-based application. I'm customizing a number of its #define parameters to change default settings to save ...
0
votes
1answer
53 views

Adafruit ImageReader Library 2.3.5 added several library dependencies

Why has Adafruit ImageReader Library v2.3.5 recently added six dependencies on other libraries for hardware I'm not using? I used the v2.3.2 of the Adafruit ImageReader Library successfully two ...
0
votes
0answers
51 views

Mqtt setCallback with arduino mega in custom library

in pubsubclient library in method Set callback, calback is defined as MQTT_CALLBACK_SIGNATURE I found in code #if defined(ESP8266) || defined(ESP32) #include <functional> #define ...
0
votes
0answers
23 views

to define a object in your own arduino library which is already defined in inbuilt library

I am creating my own GPS library using NeoGPS library. So for fixing the GPS NeoGPS library defines gps_fix as: gps_fix fix; Now i want to define the same thing in my library. How to define the ...
0
votes
1answer
94 views

Trying to read different gas levels with MQ2 Gas Sensor

I found a link on how to connect MQ-2 Gas Sensor to Arduino Uno. http://electronicsprojectshub.com/how-to-connect-mq2-gas-sensor-to-arduino/ After I bought all the parts and tried it out, the sensor ...
0
votes
2answers
43 views

Unable to declare variable in a library that doesn't have a class: multiple definition of the variable

I have created a library Lib that doesn't have a class. I want this library to have a variable that can be accessed from outside. The way I would go about this is to just declare them in the header ...
0
votes
0answers
110 views

MQ7.h: No such file or directory

Using ESP32 I'm making air pollution quality meter. For that I need MQ7.h library which is of version 1.0.4 MQUnified sensor library, which supports all sensors. I am using MQ7 carbon monoxide sensor....
0
votes
1answer
71 views

Error: function was not declared in this scope when using a library without classes

I have created a library of functions that doesn't have and mustn't have a class. In order to have functions inside the library that can only be called from the library itself, you just write them ...
0
votes
0answers
44 views

Arduino Lib doesn't recognize String type

I use the following code snippet in a library I wrote: int MyClass::Send(MyMessage* message) { String rev = func(); // Do Work } And in a different library I wrote: String func(){ ...
0
votes
0answers
94 views

Having problems compiling this code for NRF24l01 on stm8s103f3p6

It said it has mutiple libraries were found for "nRF24L01.h" but i check the Ardurino libraries I can only found one. And it work fine if I compile it to Arduino uno. //Include Libraries #include <...
0
votes
2answers
53 views

How do I segment Arduino program when line count is so large that code maintenance is difficult?

I'm looking for the Arduino/C++ equivalent of COBOL's 'copy' statement. I'm working on a program that is approaching 600 lines of code in the TopLevel.cpp source file. This is hard to manage ...
0
votes
1answer
24 views

Protecting variables and functions within a library that has no class

If you want to have functions within a library that only the library itself should be able to use or variables that shouldn't be accessed from outside, you usually make them private by writing this in ...
0
votes
2answers
41 views

TimerOne Hanging

For the following program. Compiles and runs. I start the Serial Monitor (shown following code) and it asks me to input the Blink Rate. This runs in setup. Then it enters the loop and prints to the ...
-1
votes
1answer
156 views

How to Use Function Code 6 Modbus RTU library

I'm trying to communicate with a temperature controller using Modbus RTU. I used this Arduino library. I was able to read PV(current temperature value) using below code. It uses Function code 4. I ...
0
votes
1answer
26 views

Initalizing library object in own library

EDIT: @Juraj fixed the Issue, changes at the end of the post I am developing an application to program OneWire ID Chips. I am using the OneWire library (https://github.com/PaulStoffregen/OneWire) and ...
0
votes
1answer
91 views

millis() function works with inline code and gives output but when creating own library it doesn't works

I am creating library for GPS to use in my project. I am using Adafruit GPS and its library to create my own library in which I am using millis() function to display the GPS Location after 1 minute (...
0
votes
1answer
39 views

Creating an array with the length coming from a library

When creating an array like in the sketch #include <Lib.h> int myArray[Lib::len]; void setup() {} void loop() {} the variable len must be an integer constant that is known at compile time. ...
0
votes
1answer
529 views

Error: invalid application of 'sizeof' to incomplete type 'int []' when trying to compute the size of an array in a library

I have created a library that contains an array. This is the .h file: class Lib { public: static int arr[]; }; And this is the .cpp file: #include "Lib.h" int Lib::arr[] = {0, 1, 2, 3}; ...
0
votes
2answers
33 views

Including keypad library removes sound from my piezo element

I am using the keypad library to include keypad and input numbers. when a specific number is entered a sound must be made. However when I input using the serial monitor , sound is working. But when I ...
4
votes
2answers
153 views

How to document a custom library in Arduino

I have created my own library and it is working flawlessly. Now I want to add some documentation to it that the Arduino IDE can understand. For the functions from the Arduino IDE itself like delay(ms)...
1
vote
0answers
89 views

Use Arduino Libraries in PlatformIO?

I'd like to use Arduino libraries installed in C:\Users\Username\Documents\Arduino\libraries in a PlatformIO project. Is it possible? if so, how?
0
votes
1answer
93 views

How to use existing (non-arduino-specific) library with subfolders in Arduino IDE?

I have a generic c++ library that i'd like to use in an arduino project without making changes to the library code. The library contains subfolders and files in the library include other files of the ...
0
votes
1answer
28 views

Calling functions from an array of pointers in a library causes 'undefined reference to' error

I am trying to create a library, where I have an array of pointers to functions in it. This array is used by other functions in the library. This is the code of the header file: class Lib { public: ...
1
vote
1answer
744 views

FastLED library: How can I adjust the brightness of a single pixel on an absolute scale?

I'm using the FastLED library to control a digital RGB LED strip. While this library seems very comprehensive in capability and ease of use, I do not yet see a way to simply set the brightness value ...
0
votes
2answers
164 views

How to set “IPAddress ip” using a variable?

Created a "variableInput.h" file for editing variables in one place; instead of searching multiple lines of code, to find lines needing editing. // variableInput.h // // User defineable ...
1
vote
1answer
830 views

Library compilation error

Need help for this Tutorial. I tried to compile the code, but I'm getting compiling error. I tried to ask on that forum too but got no answer, the error is: In file included from C:\Program Files (...
0
votes
0answers
42 views

Check if the fingerprint exists and enroll with it? Adafruit_Fingerprint.h

I need to verify a fingerprint before being registered, but I have to put the finger 3 times on the finger sensor, which I prefer to do it just twice. The verification is ok, but I don't understand ...
0
votes
0answers
54 views

IRremote library not compiling for Sparkfun RedBoard Artemis

I have an IR Receiver hooked up to digital pin 10 on my Sparkfun RedBoard Artemis and I want to decode IR signals coming from a TV remote. I have the following code: #include <IRremote.h> int ...
2
votes
4answers
142 views

Why do most arduino function return a -1 instead of a 0

Many arduino functions return -1 if something 'fails'. Serial.read for example returns -1 or the infamous ÿ when this function is called while the serial buffer is empty. As embedded C progammer, I ...
0
votes
1answer
557 views

Wiring ESP8266 and PN532

I'm trying the Android Hce example in this PN532 library. I can't find how to set SDA and SCL address in the code, so I tried connecting them in CLK and SD0 pins. The serial monitor gives me "Didn't ...
0
votes
0answers
140 views

Fonts/Org_01.h: No such file or directory

I have written one Arduino code for working with tft lcd 2.4 and in it i used <Fonts/Org_01.h> new font ,It was working in my Win8 OS but now in Linux OS i have installed new Arduino in my ...
0
votes
1answer
289 views

How to scale a bitmap (uint8_t array) in Arduino?

So I have a project where I send text to an Arduino, which is then printed out as a QR code on a thermal printer that can take a bitmap image with a given width and height. Is there a way I can "...
0
votes
0answers
111 views

Using a 122x32 LCD display with u8g2

I recovered a 122x32 graphic LCD display, its reference is NMTB-S000087FYHSAY-04. Here are some pics It was retrieved from a completely rusted object, but the screen seems to work. It is a 122x32 ...
0
votes
1answer
76 views

SPIMemory does not write always correctly

I'm using a WinBond 25Q128FVIQ (Flash 128 mbit, 3.3V) in combination with the Marzogh SpiMemory library on my Arduino Nano (also 3.3V). After using the default example, I found out what was read, did ...
0
votes
1answer
487 views

Error: “'lcd' does not name a type” using LiquidCrystal library

I'm following an online Arduino tutorial/course and trying to make a simple moving character on an LCD screen, but for some reason I get the following error: "error: 'lcd' does not name a type". I'm ...
0
votes
0answers
211 views

Using the Broadcom AFBR-S50 with Arduino

I'm trying to interface with a Broadcom AFBR-S50MV85G ToF sensor over SPI using an Arduino, which is complicated by the fact that the provided library and reference application is written for Cortex ...

1
2 3 4 5
9